summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
committerTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
commit868fa2fe829687343ffae624259930155e16dbd8 (patch)
tree54d316199dd9739c57c3aacd131853bbd6554a94 /ui
parentbb1bdbd796f966b5bf11f40ecbea12621c7bfac9 (diff)
downloadchromium_org-868fa2fe829687343ffae624259930155e16dbd8.tar.gz
Merge from Chromium at DEPS revision r205460
This commit was generated by merge_to_master.py. Change-Id: I4a744a5e426bd3bb378d887cfa56fe054742a540
Diffstat (limited to 'ui')
-rw-r--r--ui/android/OWNERS1
-rw-r--r--ui/android/java/res/drawable-hdpi/color_picker_advanced_select_handle.pngbin0 -> 1800 bytes
-rw-r--r--ui/android/java/res/drawable-nodpi/divider_horizontal_bright.9.pngbin0 -> 109 bytes
-rw-r--r--ui/android/java/res/drawable-xhdpi/color_picker_advanced_select_handle.pngbin0 -> 2422 bytes
-rw-r--r--ui/android/java/res/drawable/color_picker_advanced_select_handle.pngbin0 -> 1176 bytes
-rw-r--r--ui/android/java/res/drawable/color_picker_border.xml10
-rw-r--r--ui/android/java/res/layout/color_picker_advanced_component.xml46
-rw-r--r--ui/android/java/res/layout/color_picker_dialog_content.xml48
-rw-r--r--ui/android/java/res/layout/color_picker_dialog_title.xml40
-rw-r--r--ui/android/java/res/values/dimens.xml15
-rw-r--r--ui/android/java/resource_map/org/chromium/ui/R.java27
-rw-r--r--ui/android/java/src/org/chromium/ui/ColorPickerAdvanced.java252
-rw-r--r--ui/android/java/src/org/chromium/ui/ColorPickerAdvancedComponent.java94
-rw-r--r--ui/android/java/src/org/chromium/ui/ColorPickerDialog.java304
-rw-r--r--ui/android/java/src/org/chromium/ui/ColorPickerSimple.java146
-rw-r--r--ui/android/java/src/org/chromium/ui/OnColorChangedListener.java17
-rw-r--r--ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java23
-rw-r--r--ui/android/java/strings/android_ui_strings.grd21
-rw-r--r--ui/app_list/app_list.gyp4
-rw-r--r--ui/app_list/app_list_constants.cc3
-rw-r--r--ui/app_list/app_list_constants.h3
-rw-r--r--ui/app_list/cocoa/app_list_view_controller.h21
-rw-r--r--ui/app_list/cocoa/app_list_view_controller.mm101
-rw-r--r--ui/app_list/cocoa/app_list_view_controller_unittest.mm9
-rw-r--r--ui/app_list/cocoa/apps_grid_controller.h4
-rw-r--r--ui/app_list/cocoa/apps_grid_controller.mm7
-rw-r--r--ui/app_list/cocoa/apps_grid_controller_unittest.mm8
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller.h52
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller.mm293
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller_unittest.mm123
-rw-r--r--ui/app_list/cocoa/test/apps_grid_controller_test_helper.h7
-rw-r--r--ui/app_list/cocoa/test/apps_grid_controller_test_helper.mm15
-rw-r--r--ui/app_list/views/app_list_background.cc5
-rw-r--r--ui/app_list/views/app_list_drag_and_drop_host.h4
-rw-r--r--ui/app_list/views/app_list_item_view.cc2
-rw-r--r--ui/app_list/views/app_list_item_view.h4
-rw-r--r--ui/app_list/views/apps_grid_view.cc51
-rw-r--r--ui/app_list/views/apps_grid_view.h4
-rw-r--r--ui/app_list/views/cached_label.cc2
-rw-r--r--ui/app_list/views/signin_view.cc6
-rw-r--r--ui/aura/aura.gyp15
-rw-r--r--ui/aura/bench/DEPS2
-rw-r--r--ui/aura/bench/bench_main.cc6
-rw-r--r--ui/aura/client/cursor_client.h2
-rw-r--r--ui/aura/client/tooltip_client.cc12
-rw-r--r--ui/aura/client/tooltip_client.h6
-rw-r--r--ui/aura/demo/demo_main.cc4
-rw-r--r--ui/aura/dispatcher_win.cc2
-rw-r--r--ui/aura/env.cc4
-rw-r--r--ui/aura/env.h2
-rw-r--r--ui/aura/remote_root_window_host_win.cc53
-rw-r--r--ui/aura/remote_root_window_host_win.h67
-rw-r--r--ui/aura/root_window_host_ozone.cc131
-rw-r--r--ui/aura/root_window_host_ozone.h68
-rw-r--r--ui/aura/root_window_host_x11.cc6
-rw-r--r--ui/aura/test/event_generator.h28
-rw-r--r--ui/aura/test/test_cursor_client.cc77
-rw-r--r--ui/aura/test/test_cursor_client.h49
-rw-r--r--ui/aura/test/test_suite.cc3
-rw-r--r--ui/aura/test/ui_controls_factory_aura.h20
-rw-r--r--ui/aura/test/ui_controls_factory_aurawin.cc91
-rw-r--r--ui/aura/test/ui_controls_factory_aurax11.cc258
-rw-r--r--ui/aura/window.cc42
-rw-r--r--ui/aura/window.h12
-rw-r--r--ui/base/accelerators/accelerator.cc2
-rw-r--r--ui/base/clipboard/clipboard.cc35
-rw-r--r--ui/base/clipboard/clipboard.h41
-rw-r--r--ui/base/clipboard/clipboard_android.cc29
-rw-r--r--ui/base/clipboard/clipboard_aura.cc41
-rw-r--r--ui/base/clipboard/clipboard_aurax11.cc37
-rw-r--r--ui/base/clipboard/clipboard_gtk.cc40
-rw-r--r--ui/base/clipboard/clipboard_mac.mm53
-rw-r--r--ui/base/clipboard/clipboard_sourcetag.h16
-rw-r--r--ui/base/clipboard/clipboard_unittest.cc5
-rw-r--r--ui/base/clipboard/clipboard_util_win.cc4
-rw-r--r--ui/base/clipboard/clipboard_win.cc30
-rw-r--r--ui/base/clipboard/custom_data_helper_unittest.cc2
-rw-r--r--ui/base/clipboard/scoped_clipboard_writer.cc15
-rw-r--r--ui/base/clipboard/scoped_clipboard_writer.h5
-rw-r--r--ui/base/cocoa/animation_utils.h62
-rw-r--r--ui/base/cocoa/cocoa_event_utils.h42
-rw-r--r--ui/base/cocoa/cocoa_event_utils.mm70
-rw-r--r--ui/base/cocoa/cocoa_event_utils_unittest.mm128
-rw-r--r--ui/base/cocoa/flipped_view.h20
-rw-r--r--ui/base/cocoa/flipped_view.mm13
-rw-r--r--ui/base/cocoa/hover_button.h2
-rw-r--r--ui/base/cocoa/hover_button.mm6
-rw-r--r--ui/base/cocoa/menu_controller.h88
-rw-r--r--ui/base/cocoa/menu_controller.mm234
-rw-r--r--ui/base/cocoa/menu_controller_unittest.mm362
-rw-r--r--ui/base/cocoa/underlay_opengl_hosting_window.mm3
-rw-r--r--ui/base/cocoa/view_description.h21
-rw-r--r--ui/base/cocoa/view_description.mm31
-rw-r--r--ui/base/dragdrop/drag_utils.cc2
-rw-r--r--ui/base/dragdrop/gtk_dnd_util.cc2
-rw-r--r--ui/base/dragdrop/gtk_dnd_util_unittest.cc2
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_aura.cc2
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_aurax11.cc2
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_win.cc2
-rw-r--r--ui/base/dragdrop/os_exchange_data_win_unittest.cc2
-rw-r--r--ui/base/events/event.cc3
-rw-r--r--ui/base/events/event.h1
-rw-r--r--ui/base/gtk/gtk_im_context_util.cc2
-rw-r--r--ui/base/ime/character_composer.cc2
-rw-r--r--ui/base/ime/character_composer_unittest.cc2
-rw-r--r--ui/base/ime/input_method_ibus.cc120
-rw-r--r--ui/base/ime/input_method_ibus.h20
-rw-r--r--ui/base/ime/input_method_ibus_unittest.cc35
-rw-r--r--ui/base/ime/text_input_client.h4
-rw-r--r--ui/base/ime/win/mock_tsf_bridge.cc14
-rw-r--r--ui/base/ime/win/mock_tsf_bridge.h14
-rw-r--r--ui/base/ime/win/tsf_bridge.cc104
-rw-r--r--ui/base/ime/win/tsf_bridge.h5
-rw-r--r--ui/base/ime/win/tsf_text_store_unittest.cc1
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.cc6
-rw-r--r--ui/base/l10n/l10n_font_util.cc2
-rw-r--r--ui/base/l10n/l10n_util.cc2
-rw-r--r--ui/base/l10n/l10n_util_unittest.cc2
-rw-r--r--ui/base/latency_info.cc2
-rw-r--r--ui/base/layout_mac.mm13
-rw-r--r--ui/base/models/tree_node_model.h8
-rw-r--r--ui/base/models/tree_node_model_unittest.cc2
-rw-r--r--ui/base/ozone/event_converter_ozone.cc33
-rw-r--r--ui/base/ozone/event_converter_ozone.h38
-rw-r--r--ui/base/ozone/event_factory_ozone.cc66
-rw-r--r--ui/base/ozone/event_factory_ozone.h35
-rw-r--r--ui/base/ozone/events_ozone.cc154
-rw-r--r--ui/base/ozone/key_event_converter_ozone.cc64
-rw-r--r--ui/base/ozone/key_event_converter_ozone.h27
-rw-r--r--ui/base/ozone/surface_factory_ozone.h7
-rw-r--r--ui/base/ozone/touch_event_converter_ozone.cc181
-rw-r--r--ui/base/ozone/touch_event_converter_ozone.h77
-rw-r--r--ui/base/ozone/touch_event_converter_ozone_unittest.cc397
-rw-r--r--ui/base/resource/resource_bundle.cc4
-rw-r--r--ui/base/resource/resource_bundle_unittest.cc2
-rw-r--r--ui/base/resource/resource_bundle_win.cc2
-rw-r--r--ui/base/strings/ui_strings.grd5
-rw-r--r--ui/base/strings/ui_strings_am.xtb7
-rw-r--r--ui/base/strings/ui_strings_ar.xtb7
-rw-r--r--ui/base/strings/ui_strings_bg.xtb7
-rw-r--r--ui/base/strings/ui_strings_bn.xtb7
-rw-r--r--ui/base/strings/ui_strings_ca.xtb7
-rw-r--r--ui/base/strings/ui_strings_cs.xtb7
-rw-r--r--ui/base/strings/ui_strings_da.xtb7
-rw-r--r--ui/base/strings/ui_strings_de.xtb7
-rw-r--r--ui/base/strings/ui_strings_el.xtb7
-rw-r--r--ui/base/strings/ui_strings_en-GB.xtb7
-rw-r--r--ui/base/strings/ui_strings_es-419.xtb7
-rw-r--r--ui/base/strings/ui_strings_es.xtb7
-rw-r--r--ui/base/strings/ui_strings_et.xtb7
-rw-r--r--ui/base/strings/ui_strings_fa.xtb7
-rw-r--r--ui/base/strings/ui_strings_fi.xtb7
-rw-r--r--ui/base/strings/ui_strings_fil.xtb7
-rw-r--r--ui/base/strings/ui_strings_fr.xtb7
-rw-r--r--ui/base/strings/ui_strings_gu.xtb7
-rw-r--r--ui/base/strings/ui_strings_hi.xtb7
-rw-r--r--ui/base/strings/ui_strings_hr.xtb7
-rw-r--r--ui/base/strings/ui_strings_hu.xtb7
-rw-r--r--ui/base/strings/ui_strings_id.xtb7
-rw-r--r--ui/base/strings/ui_strings_it.xtb7
-rw-r--r--ui/base/strings/ui_strings_iw.xtb7
-rw-r--r--ui/base/strings/ui_strings_ja.xtb7
-rw-r--r--ui/base/strings/ui_strings_kn.xtb7
-rw-r--r--ui/base/strings/ui_strings_ko.xtb7
-rw-r--r--ui/base/strings/ui_strings_lt.xtb7
-rw-r--r--ui/base/strings/ui_strings_lv.xtb7
-rw-r--r--ui/base/strings/ui_strings_ml.xtb7
-rw-r--r--ui/base/strings/ui_strings_mr.xtb7
-rw-r--r--ui/base/strings/ui_strings_ms.xtb7
-rw-r--r--ui/base/strings/ui_strings_nl.xtb7
-rw-r--r--ui/base/strings/ui_strings_no.xtb7
-rw-r--r--ui/base/strings/ui_strings_pl.xtb7
-rw-r--r--ui/base/strings/ui_strings_pt-BR.xtb7
-rw-r--r--ui/base/strings/ui_strings_pt-PT.xtb7
-rw-r--r--ui/base/strings/ui_strings_ro.xtb7
-rw-r--r--ui/base/strings/ui_strings_ru.xtb7
-rw-r--r--ui/base/strings/ui_strings_sk.xtb7
-rw-r--r--ui/base/strings/ui_strings_sl.xtb7
-rw-r--r--ui/base/strings/ui_strings_sr.xtb7
-rw-r--r--ui/base/strings/ui_strings_sv.xtb7
-rw-r--r--ui/base/strings/ui_strings_sw.xtb7
-rw-r--r--ui/base/strings/ui_strings_ta.xtb7
-rw-r--r--ui/base/strings/ui_strings_te.xtb7
-rw-r--r--ui/base/strings/ui_strings_th.xtb7
-rw-r--r--ui/base/strings/ui_strings_tr.xtb7
-rw-r--r--ui/base/strings/ui_strings_uk.xtb7
-rw-r--r--ui/base/strings/ui_strings_vi.xtb7
-rw-r--r--ui/base/strings/ui_strings_zh-CN.xtb7
-rw-r--r--ui/base/strings/ui_strings_zh-TW.xtb7
-rw-r--r--ui/base/test/ui_controls.h102
-rw-r--r--ui/base/test/ui_controls_aura.cc95
-rw-r--r--ui/base/test/ui_controls_aura.h57
-rw-r--r--ui/base/test/ui_controls_gtk.cc261
-rw-r--r--ui/base/test/ui_controls_internal_win.cc347
-rw-r--r--ui/base/test/ui_controls_internal_win.h32
-rw-r--r--ui/base/test/ui_controls_mac.mm373
-rw-r--r--ui/base/test/ui_controls_win.cc75
-rw-r--r--ui/base/text/bytes_formatting.cc2
-rw-r--r--ui/base/text/bytes_formatting_unittest.cc2
-rw-r--r--ui/base/text/text_elider.cc2
-rw-r--r--ui/base/text/text_elider_unittest.cc2
-rw-r--r--ui/base/touch/touch_device_aurax11.cc1
-rw-r--r--ui/base/ui_base_switches.cc3
-rw-r--r--ui/base/ui_base_switches.h1
-rw-r--r--ui/base/ui_base_switches_util.cc10
-rw-r--r--ui/base/win/dpi.cc27
-rw-r--r--ui/base/win/ime_input.cc2
-rw-r--r--ui/base/win/mouse_wheel_util.cc3
-rw-r--r--ui/base/win/singleton_hwnd.cc4
-rw-r--r--ui/base/x/selection_utils.cc2
-rw-r--r--ui/base/x/x11_util.cc52
-rw-r--r--ui/compositor/DEPS8
-rw-r--r--ui/compositor/compositor.cc41
-rw-r--r--ui/compositor/compositor.gyp30
-rw-r--r--ui/compositor/compositor.h42
-rw-r--r--ui/compositor/debug_utils.cc2
-rw-r--r--ui/compositor/layer.cc85
-rw-r--r--ui/compositor/layer.h12
-rw-r--r--ui/compositor/layer_animator.cc21
-rw-r--r--ui/compositor/layer_animator.h2
-rw-r--r--ui/compositor/layer_animator_unittest.cc2
-rw-r--r--ui/compositor/test/compositor_test_support.cc60
-rw-r--r--ui/compositor/test/compositor_test_support.h20
-rw-r--r--ui/compositor/test/test_suite.cc3
-rw-r--r--ui/compositor/test_web_graphics_context_3d.cc8
-rw-r--r--ui/compositor/test_web_graphics_context_3d.h6
-rw-r--r--ui/gfx/OWNERS4
-rw-r--r--ui/gfx/android/device_display_info.cc7
-rw-r--r--ui/gfx/android/device_display_info.h3
-rw-r--r--ui/gfx/canvas.cc8
-rw-r--r--ui/gfx/canvas.h16
-rw-r--r--ui/gfx/canvas_android.cc4
-rw-r--r--ui/gfx/canvas_mac.mm8
-rw-r--r--ui/gfx/canvas_skia.cc35
-rw-r--r--ui/gfx/canvas_unittest.cc7
-rw-r--r--ui/gfx/font.cc4
-rw-r--r--ui/gfx/font.h2
-rw-r--r--ui/gfx/font_fallback_win.cc4
-rw-r--r--ui/gfx/font_unittest.cc6
-rw-r--r--ui/gfx/image/image_skia.cc16
-rw-r--r--ui/gfx/image/image_skia.h2
-rw-r--r--ui/gfx/pango_util.cc12
-rw-r--r--ui/gfx/pango_util.h6
-rw-r--r--ui/gfx/platform_font.h2
-rw-r--r--ui/gfx/platform_font_ios.h2
-rw-r--r--ui/gfx/platform_font_ios.mm4
-rw-r--r--ui/gfx/platform_font_mac.h2
-rw-r--r--ui/gfx/platform_font_mac.mm4
-rw-r--r--ui/gfx/platform_font_pango.cc4
-rw-r--r--ui/gfx/platform_font_pango.h2
-rw-r--r--ui/gfx/platform_font_win.cc6
-rw-r--r--ui/gfx/platform_font_win.h2
-rw-r--r--ui/gfx/point_base.h12
-rw-r--r--ui/gfx/point_unittest.cc36
-rw-r--r--ui/gfx/rect_base.h7
-rw-r--r--ui/gfx/rect_base_impl.h7
-rw-r--r--ui/gfx/rect_unittest.cc30
-rw-r--r--ui/gfx/render_text.cc36
-rw-r--r--ui/gfx/render_text.h21
-rw-r--r--ui/gfx/render_text_unittest.cc129
-rw-r--r--ui/gfx/render_text_win.cc2
-rw-r--r--ui/gfx/screen_mac.mm10
-rw-r--r--ui/gfx/size_base.h12
-rw-r--r--ui/gfx/size_unittest.cc36
-rw-r--r--ui/gfx/text_utils.cc10
-rw-r--r--ui/gfx/text_utils.h8
-rw-r--r--ui/gfx/text_utils_unittest.cc10
-rw-r--r--ui/gfx/transform.cc8
-rw-r--r--ui/gfx/transform_unittest.cc29
-rw-r--r--ui/gfx/vector2d.h12
-rw-r--r--ui/gfx/vector2d_f.h12
-rw-r--r--ui/gfx/vector2d_unittest.cc36
-rw-r--r--ui/gfx/vector3d_f.h16
-rw-r--r--ui/gfx/vector3d_unittest.cc24
-rw-r--r--ui/gl/DEPS2
-rw-r--r--ui/gl/android/scoped_java_surface.cc38
-rw-r--r--ui/gl/android/scoped_java_surface.h25
-rw-r--r--ui/gl/android/surface_texture_listener.cc2
-rw-r--r--ui/gl/gl.gyp4
-rw-r--r--ui/gl/gl.target.darwin-arm.mk7
-rw-r--r--ui/gl/gl.target.darwin-x86.mk7
-rw-r--r--ui/gl/gl.target.linux-arm.mk7
-rw-r--r--ui/gl/gl.target.linux-x86.mk7
-rw-r--r--ui/gl/gl_context.cc27
-rw-r--r--ui/gl/gl_context.h26
-rw-r--r--ui/gl/gl_context_android.cc6
-rw-r--r--ui/gl/gl_context_cgl.cc8
-rw-r--r--ui/gl/gl_context_cgl.h2
-rw-r--r--ui/gl/gl_context_egl.cc8
-rw-r--r--ui/gl/gl_context_egl.h2
-rw-r--r--ui/gl/gl_context_glx.cc10
-rw-r--r--ui/gl/gl_context_glx.h2
-rw-r--r--ui/gl/gl_context_mac.mm2
-rw-r--r--ui/gl/gl_context_nsview.h2
-rw-r--r--ui/gl/gl_context_nsview.mm2
-rw-r--r--ui/gl/gl_context_osmesa.cc9
-rw-r--r--ui/gl/gl_context_osmesa.h2
-rw-r--r--ui/gl/gl_context_stub.cc5
-rw-r--r--ui/gl/gl_context_stub.h2
-rw-r--r--ui/gl/gl_context_wgl.cc8
-rw-r--r--ui/gl/gl_context_wgl.h2
-rw-r--r--ui/gl/gl_egl_api_implementation.cc16
-rw-r--r--ui/gl/gl_egl_api_implementation.h2
-rw-r--r--ui/gl/gl_gl_api_implementation.cc27
-rw-r--r--ui/gl/gl_gl_api_implementation.h2
-rw-r--r--ui/gl/gl_glx_api_implementation.cc20
-rw-r--r--ui/gl/gl_glx_api_implementation.h2
-rw-r--r--ui/gl/gl_implementation.h10
-rw-r--r--ui/gl/gl_implementation_android.cc10
-rw-r--r--ui/gl/gl_implementation_mac.cc4
-rw-r--r--ui/gl/gl_implementation_ozone.cc10
-rw-r--r--ui/gl/gl_implementation_win.cc12
-rw-r--r--ui/gl/gl_implementation_x11.cc12
-rw-r--r--ui/gl/gl_jni_headers.target.darwin-arm.mk7
-rw-r--r--ui/gl/gl_jni_headers.target.darwin-x86.mk7
-rw-r--r--ui/gl/gl_jni_headers.target.linux-arm.mk7
-rw-r--r--ui/gl/gl_jni_headers.target.linux-x86.mk7
-rw-r--r--ui/gl/gl_surface_egl.cc25
-rw-r--r--ui/gl/gl_surface_glx.cc5
-rw-r--r--ui/gl/gl_surface_mac.cc2
-rw-r--r--ui/gl/gl_surface_osmesa.cc13
-rw-r--r--ui/gl/gl_surface_win.cc2
-rw-r--r--ui/gl/gl_surface_x11.cc2
-rw-r--r--ui/gl/gl_wgl_api_implementation.cc9
-rw-r--r--ui/gl/gl_wgl_api_implementation.h2
-rw-r--r--ui/gl/surface_jni_headers.target.darwin-arm.mk1
-rw-r--r--ui/gl/surface_jni_headers.target.darwin-x86.mk1
-rw-r--r--ui/gl/surface_jni_headers.target.linux-arm.mk1
-rw-r--r--ui/gl/surface_jni_headers.target.linux-x86.mk1
-rw-r--r--ui/gl/surface_texture_jni_headers.target.darwin-arm.mk1
-rw-r--r--ui/gl/surface_texture_jni_headers.target.darwin-x86.mk1
-rw-r--r--ui/gl/surface_texture_jni_headers.target.linux-arm.mk1
-rw-r--r--ui/gl/surface_texture_jni_headers.target.linux-x86.mk1
-rw-r--r--ui/keyboard/keyboard.cc5
-rw-r--r--ui/keyboard/keyboard.gyp3
-rw-r--r--ui/keyboard/keyboard.h2
-rw-r--r--ui/keyboard/keyboard_controller_unittest.cc3
-rw-r--r--ui/keyboard/keyboard_test_suite.cc3
-rw-r--r--ui/message_center/cocoa/notification_controller.h6
-rw-r--r--ui/message_center/cocoa/notification_controller.mm185
-rw-r--r--ui/message_center/cocoa/notification_controller_unittest.mm52
-rw-r--r--ui/message_center/cocoa/popup_collection.h4
-rw-r--r--ui/message_center/cocoa/popup_collection.mm33
-rw-r--r--ui/message_center/cocoa/popup_collection_unittest.mm249
-rw-r--r--ui/message_center/cocoa/popup_controller.mm81
-rw-r--r--ui/message_center/cocoa/popup_controller_unittest.mm3
-rw-r--r--ui/message_center/cocoa/settings_controller.h75
-rw-r--r--ui/message_center/cocoa/settings_controller.mm317
-rw-r--r--ui/message_center/cocoa/settings_controller_unittest.mm80
-rw-r--r--ui/message_center/cocoa/status_item_view.mm96
-rw-r--r--ui/message_center/cocoa/status_item_view_unittest.mm18
-rw-r--r--ui/message_center/cocoa/tray_controller.h7
-rw-r--r--ui/message_center/cocoa/tray_controller.mm37
-rw-r--r--ui/message_center/cocoa/tray_controller_unittest.mm59
-rw-r--r--ui/message_center/cocoa/tray_view_controller.h34
-rw-r--r--ui/message_center/cocoa/tray_view_controller.mm366
-rw-r--r--ui/message_center/cocoa/tray_view_controller_unittest.mm183
-rw-r--r--ui/message_center/fake_message_center.cc30
-rw-r--r--ui/message_center/fake_message_center.h26
-rw-r--r--ui/message_center/fake_notifier_settings_provider.cc39
-rw-r--r--ui/message_center/fake_notifier_settings_provider.h37
-rw-r--r--ui/message_center/message_center.gyp10
-rw-r--r--ui/message_center/message_center.h98
-rw-r--r--ui/message_center/message_center_impl.cc272
-rw-r--r--ui/message_center/message_center_impl.h143
-rw-r--r--ui/message_center/message_center_impl_unittest.cc210
-rw-r--r--ui/message_center/message_center_observer.h4
-rw-r--r--ui/message_center/message_center_style.h8
-rw-r--r--ui/message_center/message_center_tray.cc2
-rw-r--r--ui/message_center/message_center_tray_unittest.cc51
-rw-r--r--ui/message_center/message_center_util.cc13
-rw-r--r--ui/message_center/message_center_util.h2
-rw-r--r--ui/message_center/notification.cc102
-rw-r--r--ui/message_center/notification.h106
-rw-r--r--ui/message_center/notification_list.cc60
-rw-r--r--ui/message_center/notification_list.h17
-rw-r--r--ui/message_center/notification_list_unittest.cc211
-rw-r--r--ui/message_center/notification_types.cc2
-rw-r--r--ui/message_center/notification_types.h1
-rw-r--r--ui/message_center/notifier_settings.cc2
-rw-r--r--ui/message_center/test/run_all_unittests.cc6
-rw-r--r--ui/message_center/views/bounded_label.cc2
-rw-r--r--ui/message_center/views/bounded_label_unittest.cc2
-rw-r--r--ui/message_center/views/message_center_view.cc7
-rw-r--r--ui/message_center/views/message_center_view_unittest.cc3
-rw-r--r--ui/message_center/views/message_popup_collection.cc74
-rw-r--r--ui/message_center/views/message_popup_collection.h2
-rw-r--r--ui/message_center/views/message_popup_collection_unittest.cc21
-rw-r--r--ui/message_center/views/notification_view.cc22
-rw-r--r--ui/message_center/views/notifier_settings_view.cc2
-rw-r--r--ui/message_center/views/toast_contents_view.cc47
-rw-r--r--ui/message_center/views/toast_contents_view.h16
-rw-r--r--ui/metro_viewer/metro_viewer_messages.h6
-rw-r--r--ui/native_theme/native_theme.target.darwin-arm.mk1
-rw-r--r--ui/native_theme/native_theme.target.darwin-x86.mk1
-rw-r--r--ui/native_theme/native_theme.target.linux-arm.mk1
-rw-r--r--ui/native_theme/native_theme.target.linux-x86.mk1
-rw-r--r--ui/oak/oak.gyp2
-rw-r--r--ui/oak/oak_aura_window_display.cc2
-rw-r--r--ui/oak/oak_pretty_print.cc4
-rw-r--r--ui/oak/oak_tree_model.cc2
-rw-r--r--ui/oak/oak_window.cc2
-rw-r--r--ui/resources/default_100_percent/common/notification_arrow.pngbin0 -> 1298 bytes
-rw-r--r--ui/resources/default_100_percent/common/notification_arrow_hover.pngbin0 -> 1260 bytes
-rw-r--r--ui/resources/default_100_percent/common/notification_arrow_pressed.pngbin0 -> 1231 bytes
-rw-r--r--ui/resources/default_100_percent/common/pointers/context_menu.pngbin474 -> 728 bytes
-rw-r--r--ui/resources/default_100_percent/common/pointers/help.pngbin614 -> 990 bytes
-rw-r--r--ui/resources/default_100_percent/common/pointers/left_ptr.pngbin386 -> 613 bytes
-rw-r--r--ui/resources/default_100_percent/common/text_selection_handle.pngbin0 -> 2123 bytes
-rw-r--r--ui/resources/default_100_percent/mac/tray_icon_pressed.pngbin98 -> 980 bytes
-rw-r--r--ui/resources/default_100_percent/mac/tray_icon_regular.pngbin101 -> 1111 bytes
-rw-r--r--ui/resources/default_200_percent/common/notification_arrow.pngbin0 -> 1634 bytes
-rw-r--r--ui/resources/default_200_percent/common/notification_arrow_hover.pngbin0 -> 1546 bytes
-rw-r--r--ui/resources/default_200_percent/common/notification_arrow_pressed.pngbin0 -> 1470 bytes
-rw-r--r--ui/resources/default_200_percent/common/pointers/context_menu.pngbin1013 -> 1593 bytes
-rw-r--r--ui/resources/default_200_percent/common/pointers/help.pngbin1453 -> 2274 bytes
-rw-r--r--ui/resources/default_200_percent/common/pointers/left_ptr.pngbin827 -> 1300 bytes
-rw-r--r--ui/resources/default_200_percent/common/text_selection_handle.pngbin0 -> 4782 bytes
-rw-r--r--ui/resources/default_200_percent/mac/tray_icon_pressed.pngbin130 -> 1007 bytes
-rw-r--r--ui/resources/default_200_percent/mac/tray_icon_regular.pngbin134 -> 1152 bytes
-rw-r--r--ui/resources/ui_resources.grd60
-rw-r--r--ui/shell_dialogs.target.darwin-arm.mk1
-rw-r--r--ui/shell_dialogs.target.darwin-x86.mk1
-rw-r--r--ui/shell_dialogs.target.linux-arm.mk1
-rw-r--r--ui/shell_dialogs.target.linux-x86.mk1
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl.h2
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc6
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc6
-rw-r--r--ui/shell_dialogs/select_file_dialog.cc2
-rw-r--r--ui/shell_dialogs/select_file_dialog.h22
-rw-r--r--ui/shell_dialogs/select_file_dialog_android.cc17
-rw-r--r--ui/shell_dialogs/select_file_dialog_android.h17
-rw-r--r--ui/shell_dialogs/select_file_dialog_mac.mm4
-rw-r--r--ui/shell_dialogs/select_file_dialog_win.cc18
-rw-r--r--ui/snapshot/snapshot.gyp6
-rw-r--r--ui/snapshot/snapshot.target.darwin-arm.mk1
-rw-r--r--ui/snapshot/snapshot.target.darwin-x86.mk1
-rw-r--r--ui/snapshot/snapshot.target.linux-arm.mk1
-rw-r--r--ui/snapshot/snapshot.target.linux-x86.mk1
-rw-r--r--ui/snapshot/snapshot_aura.cc5
-rw-r--r--ui/snapshot/snapshot_aura_unittest.cc3
-rw-r--r--ui/snapshot/snapshot_mac_unittest.mm10
-rw-r--r--ui/surface/accelerated_surface_win.cc25
-rw-r--r--ui/surface/accelerated_surface_win.h8
-rw-r--r--ui/surface/surface.target.darwin-arm.mk3
-rw-r--r--ui/surface/surface.target.darwin-x86.mk3
-rw-r--r--ui/surface/surface.target.linux-arm.mk3
-rw-r--r--ui/surface/surface.target.linux-x86.mk3
-rw-r--r--ui/ui.gyp24
-rw-r--r--ui/ui.target.darwin-arm.mk1
-rw-r--r--ui/ui.target.darwin-x86.mk1
-rw-r--r--ui/ui.target.linux-arm.mk1
-rw-r--r--ui/ui.target.linux-x86.mk1
-rw-r--r--ui/ui_jni_headers.target.darwin-arm.mk31
-rw-r--r--ui/ui_jni_headers.target.darwin-x86.mk31
-rw-r--r--ui/ui_jni_headers.target.linux-arm.mk31
-rw-r--r--ui/ui_jni_headers.target.linux-x86.mk31
-rw-r--r--ui/ui_resources.target.darwin-arm.mk2
-rw-r--r--ui/ui_resources.target.darwin-x86.mk2
-rw-r--r--ui/ui_resources.target.linux-arm.mk2
-rw-r--r--ui/ui_resources.target.linux-x86.mk2
-rw-r--r--ui/ui_unittests.gypi18
-rw-r--r--ui/views/bubble/bubble_border.cc6
-rw-r--r--ui/views/bubble/bubble_frame_view.cc34
-rw-r--r--ui/views/bubble/bubble_frame_view_unittest.cc90
-rw-r--r--ui/views/button_drag_utils.cc2
-rw-r--r--ui/views/color_chooser/color_chooser_view.cc2
-rw-r--r--ui/views/controls/button/blue_button.cc78
-rw-r--r--ui/views/controls/button/blue_button.h32
-rw-r--r--ui/views/controls/button/button.cc2
-rw-r--r--ui/views/controls/button/button.h2
-rw-r--r--ui/views/controls/button/button_dropdown.cc2
-rw-r--r--ui/views/controls/button/image_button.cc2
-rw-r--r--ui/views/controls/button/label_button.cc4
-rw-r--r--ui/views/controls/button/label_button_unittest.cc2
-rw-r--r--ui/views/controls/button/menu_button.cc2
-rw-r--r--ui/views/controls/button/text_button.cc16
-rw-r--r--ui/views/controls/combobox/combobox.cc2
-rw-r--r--ui/views/controls/combobox/native_combobox_views_unittest.cc2
-rw-r--r--ui/views/controls/combobox/native_combobox_win.cc2
-rw-r--r--ui/views/controls/image_view.cc2
-rw-r--r--ui/views/controls/label.cc2
-rw-r--r--ui/views/controls/label_unittest.cc2
-rw-r--r--ui/views/controls/link.cc2
-rw-r--r--ui/views/controls/menu/menu_controller.cc2
-rw-r--r--ui/views/controls/menu/menu_delegate.h8
-rw-r--r--ui/views/controls/menu/menu_item_view.cc2
-rw-r--r--ui/views/controls/menu/menu_item_view.h5
-rw-r--r--ui/views/controls/menu/menu_model_adapter_unittest.cc2
-rw-r--r--ui/views/controls/menu/menu_runner.cc9
-rw-r--r--ui/views/controls/message_box_view.cc11
-rw-r--r--ui/views/controls/message_box_view.h5
-rw-r--r--ui/views/controls/native/native_view_host_aura.cc8
-rw-r--r--ui/views/controls/native/native_view_host_aura_unittest.cc22
-rw-r--r--ui/views/controls/progress_bar_unittest.cc2
-rw-r--r--ui/views/controls/scrollbar/base_scroll_bar.cc16
-rw-r--r--ui/views/controls/scrollbar/base_scroll_bar.h7
-rw-r--r--ui/views/controls/scrollbar/bitmap_scroll_bar.cc2
-rw-r--r--ui/views/controls/scrollbar/kennedy_scroll_bar.cc2
-rw-r--r--ui/views/controls/scrollbar/scrollbar_unittest.cc20
-rw-r--r--ui/views/controls/slider.cc2
-rw-r--r--ui/views/controls/slider_unittest.cc2
-rw-r--r--ui/views/controls/styled_label_unittest.cc2
-rw-r--r--ui/views/controls/tabbed_pane/tabbed_pane.cc2
-rw-r--r--ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc4
-rw-r--r--ui/views/controls/table/table_view_unittest.cc2
-rw-r--r--ui/views/controls/table/test_table_model.cc2
-rw-r--r--ui/views/controls/textfield/native_textfield_views.cc42
-rw-r--r--ui/views/controls/textfield/native_textfield_views.h11
-rw-r--r--ui/views/controls/textfield/native_textfield_views_unittest.cc2
-rw-r--r--ui/views/controls/textfield/native_textfield_win.cc9
-rw-r--r--ui/views/controls/textfield/textfield.cc14
-rw-r--r--ui/views/controls/textfield/textfield.h17
-rw-r--r--ui/views/controls/textfield/textfield_controller.cc5
-rw-r--r--ui/views/controls/textfield/textfield_controller.h7
-rw-r--r--ui/views/controls/textfield/textfield_views_model.cc2
-rw-r--r--ui/views/controls/textfield/textfield_views_model_unittest.cc2
-rw-r--r--ui/views/controls/tree/tree_view_selector.cc5
-rw-r--r--ui/views/controls/tree/tree_view_selector.h1
-rw-r--r--ui/views/controls/tree/tree_view_unittest.cc2
-rw-r--r--ui/views/controls/webview/web_dialog_view.cc2
-rw-r--r--ui/views/controls/webview/webview.gyp2
-rw-r--r--ui/views/corewm/compound_event_filter_unittest.cc65
-rw-r--r--ui/views/corewm/tooltip_controller_unittest.cc2
-rw-r--r--ui/views/corewm/window_util.cc57
-rw-r--r--ui/views/corewm/window_util_unittest.cc117
-rw-r--r--ui/views/debug_utils.cc2
-rw-r--r--ui/views/examples/bubble_example.cc2
-rw-r--r--ui/views/examples/button_example.cc2
-rw-r--r--ui/views/examples/checkbox_example.cc2
-rw-r--r--ui/views/examples/combobox_example.cc2
-rw-r--r--ui/views/examples/example_combobox_model.cc2
-rw-r--r--ui/views/examples/examples_window.cc2
-rw-r--r--ui/views/examples/examples_window_with_content.cc2
-rw-r--r--ui/views/examples/label_example.cc2
-rw-r--r--ui/views/examples/link_example.cc2
-rw-r--r--ui/views/examples/menu_example.cc2
-rw-r--r--ui/views/examples/message_box_example.cc2
-rw-r--r--ui/views/examples/progress_bar_example.cc8
-rw-r--r--ui/views/examples/radio_button_example.cc2
-rw-r--r--ui/views/examples/scroll_view_example.cc2
-rw-r--r--ui/views/examples/slider_example.cc2
-rw-r--r--ui/views/examples/tabbed_pane_example.cc2
-rw-r--r--ui/views/examples/table_example.cc2
-rw-r--r--ui/views/examples/text_example.cc2
-rw-r--r--ui/views/examples/textfield_example.cc2
-rw-r--r--ui/views/examples/tree_view_example.cc2
-rw-r--r--ui/views/examples/widget_example.cc2
-rw-r--r--ui/views/focus/focus_manager_factory.cc8
-rw-r--r--ui/views/focus/focus_manager_factory.h7
-rw-r--r--ui/views/focus/focus_manager_unittest.cc5
-rw-r--r--ui/views/focus/focus_manager_unittest_win.cc2
-rw-r--r--ui/views/focus/focus_traversal_unittest.cc2
-rw-r--r--ui/views/ime/input_method_bridge.cc6
-rw-r--r--ui/views/ime/input_method_bridge.h1
-rw-r--r--ui/views/run_all_unittests.cc6
-rw-r--r--ui/views/test/child_modal_window.cc2
-rw-r--r--ui/views/test/test_views_delegate.cc4
-rw-r--r--ui/views/test/test_views_delegate.h1
-rw-r--r--ui/views/touchui/touch_editing_menu.cc2
-rw-r--r--ui/views/touchui/touch_selection_controller_impl.cc110
-rw-r--r--ui/views/touchui/touch_selection_controller_impl_unittest.cc31
-rw-r--r--ui/views/view.cc30
-rw-r--r--ui/views/view.h6
-rw-r--r--ui/views/view_constants_aura.cc16
-rw-r--r--ui/views/view_constants_aura.h22
-rw-r--r--ui/views/view_text_utils.cc2
-rw-r--r--ui/views/view_unittest.cc65
-rw-r--r--ui/views/views.gyp25
-rw-r--r--ui/views/views_delegate.h9
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.cc8
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.h6
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc21
-rw-r--r--ui/views/widget/native_widget_aura.cc15
-rw-r--r--ui/views/widget/native_widget_aura.h6
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc22
-rw-r--r--ui/views/widget/native_widget_delegate.h4
-rw-r--r--ui/views/widget/native_widget_private.h9
-rw-r--r--ui/views/widget/native_widget_win.cc5
-rw-r--r--ui/views/widget/native_widget_win.h1
-rw-r--r--ui/views/widget/tooltip_manager.cc2
-rw-r--r--ui/views/widget/widget.cc10
-rw-r--r--ui/views/widget/widget.h11
-rw-r--r--ui/views/widget/widget_delegate.cc2
-rw-r--r--ui/views/widget/widget_unittest.cc2
-rw-r--r--ui/views/widget/window_reorderer.cc201
-rw-r--r--ui/views/widget/window_reorderer.h59
-rw-r--r--ui/views/widget/window_reorderer_unittest.cc263
-rw-r--r--ui/views/window/custom_frame_view.cc2
-rw-r--r--ui/views/window/dialog_client_view.cc16
-rw-r--r--ui/views/window/dialog_client_view_unittest.cc2
-rw-r--r--ui/views/window/dialog_delegate.cc15
-rw-r--r--ui/views/window/dialog_delegate.h6
-rw-r--r--ui/views/window/dialog_delegate_unittest.cc62
-rw-r--r--ui/web_dialogs/test/test_web_dialog_delegate.cc2
-rw-r--r--ui/webui/OWNERS9
-rw-r--r--ui/webui/resources/css/tree.css1
-rw-r--r--ui/webui/resources/css/tree.css.js22
-rw-r--r--ui/webui/resources/js/cr/ui/menu_item.js3
-rw-r--r--ui/webui/resources/js/cr/ui/menu_test.html66
601 files changed, 11968 insertions, 2996 deletions
diff --git a/ui/android/OWNERS b/ui/android/OWNERS
index d2df7d5300..1c1fa0513d 100644
--- a/ui/android/OWNERS
+++ b/ui/android/OWNERS
@@ -2,3 +2,4 @@ bulach@chromium.org
nileshagrawal@chromium.org
tedchoc@chromium.org
yfriedman@chromium.org
+newt@chromium.org
diff --git a/ui/android/java/res/drawable-hdpi/color_picker_advanced_select_handle.png b/ui/android/java/res/drawable-hdpi/color_picker_advanced_select_handle.png
new file mode 100644
index 0000000000..be2dc68111
--- /dev/null
+++ b/ui/android/java/res/drawable-hdpi/color_picker_advanced_select_handle.png
Binary files differ
diff --git a/ui/android/java/res/drawable-nodpi/divider_horizontal_bright.9.png b/ui/android/java/res/drawable-nodpi/divider_horizontal_bright.9.png
new file mode 100644
index 0000000000..24f2a3f1fa
--- /dev/null
+++ b/ui/android/java/res/drawable-nodpi/divider_horizontal_bright.9.png
Binary files differ
diff --git a/ui/android/java/res/drawable-xhdpi/color_picker_advanced_select_handle.png b/ui/android/java/res/drawable-xhdpi/color_picker_advanced_select_handle.png
new file mode 100644
index 0000000000..058b30b731
--- /dev/null
+++ b/ui/android/java/res/drawable-xhdpi/color_picker_advanced_select_handle.png
Binary files differ
diff --git a/ui/android/java/res/drawable/color_picker_advanced_select_handle.png b/ui/android/java/res/drawable/color_picker_advanced_select_handle.png
new file mode 100644
index 0000000000..3cdca907c9
--- /dev/null
+++ b/ui/android/java/res/drawable/color_picker_advanced_select_handle.png
Binary files differ
diff --git a/ui/android/java/res/drawable/color_picker_border.xml b/ui/android/java/res/drawable/color_picker_border.xml
new file mode 100644
index 0000000000..87c0feb5ca
--- /dev/null
+++ b/ui/android/java/res/drawable/color_picker_border.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2013 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="#00000000"/>
+ <stroke android:width="1px" android:color="#D0D0D0" />
+</shape> \ No newline at end of file
diff --git a/ui/android/java/res/layout/color_picker_advanced_component.xml b/ui/android/java/res/layout/color_picker_advanced_component.xml
new file mode 100644
index 0000000000..a51c055b1b
--- /dev/null
+++ b/ui/android/java/res/layout/color_picker_advanced_component.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2013 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:id="@+id/text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/color_picker_gradient_margin"
+ android:layout_marginEnd="@dimen/color_picker_gradient_margin"
+ android:textAppearance="@android:style/TextAppearance.Medium"
+ android:textIsSelectable="false" />
+
+ <FrameLayout
+ android:id="@+id/gradient_border"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_below="@id/text"
+ android:layout_marginStart="@dimen/color_picker_gradient_margin"
+ android:layout_marginEnd="@dimen/color_picker_gradient_margin"
+ android:layout_marginTop="3dp"
+ android:background="@drawable/color_picker_border"
+ android:padding="1dp" >
+
+ <View
+ android:id="@+id/gradient"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ </FrameLayout>
+
+ <SeekBar
+ android:id="@+id/seek_bar"
+ android:layout_width="match_parent"
+ android:layout_height="75dp"
+ android:layout_below="@id/text"
+ android:progressDrawable="@android:color/transparent"
+ android:thumb="@drawable/color_picker_advanced_select_handle"
+ android:translationY="25dp" />
+
+</RelativeLayout> \ No newline at end of file
diff --git a/ui/android/java/res/layout/color_picker_dialog_content.xml b/ui/android/java/res/layout/color_picker_dialog_content.xml
new file mode 100644
index 0000000000..d07ce782be
--- /dev/null
+++ b/ui/android/java/res/layout/color_picker_dialog_content.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2013 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="15dp">
+
+ <org.chromium.ui.ColorPickerAdvanced
+ android:id="@+id/color_picker_advanced"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <FrameLayout
+ android:id="@+id/color_picker_simple_border"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/color_picker_border"
+ android:padding="1dp">
+
+ <org.chromium.ui.ColorPickerSimple
+ android:id="@+id/color_picker_simple"
+ android:layout_width="match_parent"
+ android:layout_height="100dp"/>
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/more_colors_button_border"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/color_picker_simple_border"
+ android:background="@drawable/color_picker_border"
+ android:padding="1dp">
+
+ <Button
+ android:id="@+id/more_colors_button"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="60dip"
+ android:text="@string/color_picker_button_more" />
+ </FrameLayout>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/ui/android/java/res/layout/color_picker_dialog_title.xml b/ui/android/java/res/layout/color_picker_dialog_title.xml
new file mode 100644
index 0000000000..cb5de4eeef
--- /dev/null
+++ b/ui/android/java/res/layout/color_picker_dialog_title.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2013 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="15dp"
+ android:paddingStart="20dp"
+ android:paddingEnd="20dp"
+ android:paddingTop="15dp" >
+
+ <TextView
+ android:id="@+id/title"
+ style="?android:attr/textAppearanceLarge"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_toStartOf="@+id/selected_color_view_border"
+ android:layout_centerVertical="true"
+ android:ellipsize="end"
+ android:singleLine="true" />
+
+ <FrameLayout
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_alignParentEnd="true"
+ android:id="@+id/selected_color_view_border"
+ android:background="@drawable/color_picker_border"
+ android:padding="1dp">
+
+ <View
+ android:id="@+id/selected_color_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@android:color/black" />
+ </FrameLayout>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/ui/android/java/res/values/dimens.xml b/ui/android/java/res/values/dimens.xml
new file mode 100644
index 0000000000..ed86372862
--- /dev/null
+++ b/ui/android/java/res/values/dimens.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2013 The Chromium Authors. All rights reserved.
+
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+<resources>
+
+ <!--
+ 14.5 = Seekbar thumb width - border width, but it depends on the width
+ of the seek bar icon.
+ -->
+ <dimen name="color_picker_gradient_margin">14.5dp</dimen>
+
+</resources> \ No newline at end of file
diff --git a/ui/android/java/resource_map/org/chromium/ui/R.java b/ui/android/java/resource_map/org/chromium/ui/R.java
index 53f60cce8d..206ca88302 100644
--- a/ui/android/java/resource_map/org/chromium/ui/R.java
+++ b/ui/android/java/resource_map/org/chromium/ui/R.java
@@ -18,5 +18,32 @@ public final class R {
public static final class string {
public static int low_memory_error;
public static int opening_file_error;
+ public static int color_picker_button_more;
+ public static int color_picker_hue;
+ public static int color_picker_saturation;
+ public static int color_picker_lightness;
+ public static int color_picker_button_set;
+ public static int color_picker_button_cancel;
+ public static int color_picker_dialog_title;
+ }
+ public static final class id {
+ public static int selected_color_view;
+ public static int title;
+ public static int more_colors_button;
+ public static int color_picker_advanced;
+ public static int color_picker_simple;
+ public static int more_colors_button_border;
+ public static int color_picker_simple_border;
+ public static int gradient;
+ public static int text;
+ public static int seek_bar;
+ }
+ public static final class layout {
+ public static int color_picker_dialog_title;
+ public static int color_picker_dialog_content;
+ public static int color_picker_advanced_component;
+ }
+ public static final class drawable {
+ public static int color_picker_advanced_select_handle;
}
}
diff --git a/ui/android/java/src/org/chromium/ui/ColorPickerAdvanced.java b/ui/android/java/src/org/chromium/ui/ColorPickerAdvanced.java
new file mode 100644
index 0000000000..7a22f610de
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/ColorPickerAdvanced.java
@@ -0,0 +1,252 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.ui;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.widget.LinearLayout;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+
+/**
+ * Represents a more advanced way for the user to choose a color, based on selecting each of
+ * the Hue, Saturation and Value attributes.
+ */
+public class ColorPickerAdvanced extends LinearLayout implements OnSeekBarChangeListener {
+ private static final int HUE_SEEK_BAR_MAX = 360;
+
+ private static final int HUE_COLOR_COUNT = 7;
+
+ private static final int SATURATION_SEEK_BAR_MAX = 100;
+
+ private static final int SATURATION_COLOR_COUNT = 2;
+
+ private static final int LIGHTNESS_SEEK_BAR_MAX = 100;
+
+ private static final int LIGHTNESS_COLOR_COUNT = 2;
+
+ ColorPickerAdvancedComponent mHueDetails;
+
+ ColorPickerAdvancedComponent mSaturationDetails;
+
+ ColorPickerAdvancedComponent mLightnessDetails;
+
+ private OnColorChangedListener mOnColorChangedListener;
+
+ private int mCurrentColor;
+
+ private final float[] mCurrentHsvValues = new float[3];
+
+ public ColorPickerAdvanced(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public ColorPickerAdvanced(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init();
+ }
+
+ public ColorPickerAdvanced(Context context) {
+ super(context);
+ init();
+ }
+
+ /**
+ * Initializes all the views and variables in the advanced view.
+ */
+ private void init() {
+ setOrientation(LinearLayout.VERTICAL);
+
+ mHueDetails = createAndAddNewGradient(R.string.color_picker_hue,
+ HUE_SEEK_BAR_MAX, this);
+ mSaturationDetails = createAndAddNewGradient(R.string.color_picker_saturation,
+ SATURATION_SEEK_BAR_MAX, this);
+ mLightnessDetails = createAndAddNewGradient(R.string.color_picker_lightness,
+ LIGHTNESS_SEEK_BAR_MAX, this);
+
+ refreshGradientComponents();
+ }
+
+ /**
+ * Creates a new GradientDetails object from the parameters provided, initializes it,
+ * and adds it to this advanced view.
+ *
+ * @param textResourceId The text to display for the label.
+ * @param seekBarMax The maximum value of the seek bar for the gradient.
+ * @param seekBarListener Object listening to when the user changes the seek bar.
+ *
+ * @return A new GradientDetails object initialized with the given parameters.
+ */
+ public ColorPickerAdvancedComponent createAndAddNewGradient(int textResourceId,
+ int seekBarMax,
+ OnSeekBarChangeListener seekBarListener) {
+ LayoutInflater inflater = (LayoutInflater) getContext()
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ View newComponent = inflater.inflate(R.layout.color_picker_advanced_component, null);
+ addView(newComponent);
+
+ return new ColorPickerAdvancedComponent(newComponent,
+ textResourceId,
+ seekBarMax,
+ seekBarListener);
+ }
+
+ /**
+ * Sets the listener for when the user changes the color.
+ *
+ * @param onColorChangedListener The object listening for the change in color.
+ */
+ public void setListener(OnColorChangedListener onColorChangedListener) {
+ mOnColorChangedListener = onColorChangedListener;
+ }
+
+ /**
+ * @return The color the user has currently chosen.
+ */
+ public int getColor() {
+ return mCurrentColor;
+ }
+
+ /**
+ * Sets the color that the user has currently chosen.
+ *
+ * @param color The currently chosen color.
+ */
+ public void setColor(int color) {
+ mCurrentColor = color;
+ Color.colorToHSV(mCurrentColor, mCurrentHsvValues);
+ refreshGradientComponents();
+ }
+
+ /**
+ * Notifies the listener, if there is one, of a change in the selected color.
+ */
+ private void notifyColorChanged() {
+ if (mOnColorChangedListener != null) {
+ mOnColorChangedListener.onColorChanged(getColor());
+ }
+ }
+
+ /**
+ * Callback for when a slider is updated on the advanced view.
+ *
+ * @param seekBar The color slider that was updated.
+ * @param progress The new value of the color slider.
+ * @param fromUser Whether it was the user the changed the value, or whether
+ * we were setting it up.
+ */
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if (fromUser) {
+ mCurrentHsvValues[0] = mHueDetails.getValue();
+ mCurrentHsvValues[1] = mSaturationDetails.getValue() / 100.0f;
+ mCurrentHsvValues[2] = mLightnessDetails.getValue() / 100.0f;
+
+ mCurrentColor = Color.HSVToColor(mCurrentHsvValues);
+
+ updateHueGradient();
+ updateSaturationGradient();
+ updateLightnessGradient();
+
+ notifyColorChanged();
+ }
+ }
+
+ /**
+ * Updates only the hue gradient display with the hue value for the
+ * currently selected color.
+ */
+ private void updateHueGradient() {
+ float[] tempHsvValues = new float[3];
+ tempHsvValues[1] = mCurrentHsvValues[1];
+ tempHsvValues[2] = mCurrentHsvValues[2];
+
+ int[] newColors = new int[HUE_COLOR_COUNT];
+
+ for (int i = 0; i < HUE_COLOR_COUNT; ++i) {
+ tempHsvValues[0] = i * 60.0f;
+ newColors[i] = Color.HSVToColor(tempHsvValues);
+ }
+ mHueDetails.setGradientColors(newColors);
+ }
+
+ /**
+ * Updates only the saturation gradient display with the saturation value
+ * for the currently selected color.
+ */
+ private void updateSaturationGradient() {
+ float[] tempHsvValues = new float[3];
+ tempHsvValues[0] = mCurrentHsvValues[0];
+ tempHsvValues[1] = 0.0f;
+ tempHsvValues[2] = mCurrentHsvValues[2];
+
+ int[] newColors = new int[SATURATION_COLOR_COUNT];
+
+ newColors[0] = Color.HSVToColor(tempHsvValues);
+
+ tempHsvValues[1] = 1.0f;
+ newColors[1] = Color.HSVToColor(tempHsvValues);
+ mSaturationDetails.setGradientColors(newColors);
+ }
+
+ /**
+ * Updates only the lightness gradient display with the lightness value for
+ * the currently selected color.
+ */
+ private void updateLightnessGradient() {
+ float[] tempHsvValues = new float[3];
+ tempHsvValues[0] = mCurrentHsvValues[0];
+ tempHsvValues[1] = mCurrentHsvValues[1];
+ tempHsvValues[2] = 0.0f;
+
+ int[] newColors = new int[LIGHTNESS_COLOR_COUNT];
+
+ newColors[0] = Color.HSVToColor(tempHsvValues);
+
+ tempHsvValues[2] = 1.0f;
+ newColors[1] = Color.HSVToColor(tempHsvValues);
+ mLightnessDetails.setGradientColors(newColors);
+ }
+
+ /**
+ * Updates all the gradient displays to show the currently selected color.
+ */
+ private void refreshGradientComponents() {
+ // Round and bound the saturation value.
+ int saturationValue = Math.round(mCurrentHsvValues[1] * 100.0f);
+ saturationValue = Math.min(saturationValue, SATURATION_SEEK_BAR_MAX);
+ saturationValue = Math.max(saturationValue, 0);
+
+ // Round and bound the lightness value.
+ int lightnessValue = Math.round(mCurrentHsvValues[2] * 100.0f);
+ lightnessValue = Math.min(lightnessValue, LIGHTNESS_SEEK_BAR_MAX);
+ lightnessValue = Math.max(lightnessValue, 0);
+
+ // Don't need to round the hue value since its possible values match the seek bar
+ // range directly.
+ mHueDetails.setValue(mCurrentHsvValues[0]);
+ mSaturationDetails.setValue(saturationValue);
+ mLightnessDetails.setValue(lightnessValue);
+
+ updateHueGradient();
+ updateSaturationGradient();
+ updateLightnessGradient();
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // Do nothing.
+ }
+
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // Do nothing.
+ }
+}
diff --git a/ui/android/java/src/org/chromium/ui/ColorPickerAdvancedComponent.java b/ui/android/java/src/org/chromium/ui/ColorPickerAdvancedComponent.java
new file mode 100644
index 0000000000..1e679d5fe8
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/ColorPickerAdvancedComponent.java
@@ -0,0 +1,94 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.ui;
+
+import android.content.Context;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.GradientDrawable.Orientation;
+import android.os.Build;
+import android.view.View;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+import org.chromium.base.ApiCompatibilityUtils;
+
+/**
+ * Encapsulates a single gradient view of the HSV color display, including its label, gradient
+ * view and seek bar.
+ *
+ * Mirrors a "color_picker_advanced_component" layout.
+ */
+public class ColorPickerAdvancedComponent {
+ // The view that displays the gradient.
+ private final View mGradientView;
+ // The seek bar that allows the user to change the value of this component.
+ private final SeekBar mSeekBar;
+ // The set of colors to interpolate the gradient through.
+ private int[] mGradientColors;
+ // The Drawable that represents the gradient.
+ private GradientDrawable mGradientDrawable;
+ // The text label for the component.
+ private final TextView mText;
+
+ /**
+ * Initializes the views.
+ *
+ * @param rootView View that contains all the content, such as the label, gradient view, etc.
+ * @param textResourceId The resource ID of the text to show on the label.
+ * @param seekBarMax The range of the seek bar.
+ * @param seekBarListener The listener for when the seek bar value changes.
+ */
+ ColorPickerAdvancedComponent(final View rootView,
+ final int textResourceId,
+ final int seekBarMax,
+ final OnSeekBarChangeListener seekBarListener) {
+ mGradientView = rootView.findViewById(R.id.gradient);
+ mText = (TextView) rootView.findViewById(R.id.text);
+ mText.setText(textResourceId);
+ mGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, null);
+ mSeekBar = (SeekBar) rootView.findViewById(R.id.seek_bar);
+ mSeekBar.setOnSeekBarChangeListener(seekBarListener);
+ mSeekBar.setMax(seekBarMax);
+ // Setting the thumb offset means the seek bar thumb can move all the way to each end
+ // of the gradient view.
+ Context context = rootView.getContext();
+ int offset = context.getResources()
+ .getDrawable(R.drawable.color_picker_advanced_select_handle)
+ .getIntrinsicWidth();
+ mSeekBar.setThumbOffset(offset / 2);
+ }
+
+ /**
+ * @return The value represented by this component, maintained by the seek bar progress.
+ */
+ public float getValue() {
+ return mSeekBar.getProgress();
+ }
+
+ /**
+ * Sets the value of the component (by setting the seek bar value).
+ *
+ * @param newValue The value to give the component.
+ */
+ public void setValue(float newValue) {
+ mSeekBar.setProgress((int) newValue);
+ }
+
+ /**
+ * Sets the colors for the gradient view to interpolate through.
+ *
+ * @param newColors The set of colors representing the interpolation points for the gradient.
+ */
+ public void setGradientColors(int[] newColors) {
+ mGradientColors = newColors.clone();
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
+ Orientation currentOrientation = Orientation.LEFT_RIGHT;
+ mGradientDrawable = new GradientDrawable(currentOrientation, mGradientColors);
+ } else {
+ mGradientDrawable.setColors(mGradientColors);
+ }
+ ApiCompatibilityUtils.setBackgroundForView(mGradientView, mGradientDrawable);
+ }
+}
diff --git a/ui/android/java/src/org/chromium/ui/ColorPickerDialog.java b/ui/android/java/src/org/chromium/ui/ColorPickerDialog.java
index d743a5c81b..58f1e0a302 100644
--- a/ui/android/java/src/org/chromium/ui/ColorPickerDialog.java
+++ b/ui/android/java/src/org/chromium/ui/ColorPickerDialog.java
@@ -4,209 +4,163 @@
package org.chromium.ui;
+import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.RectF;
-import android.graphics.Shader;
-import android.graphics.SweepGradient;
-import android.os.Bundle;
-import android.view.MotionEvent;
+import android.view.LayoutInflater;
import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
/**
- * UI for the color chooser that shows on the Android platform as a result
- * of &lt;input type=color &gt; form element.
- *
- * <p> Note that this UI is only temporary and will be replaced once the UI
- * design in
- * https://code.google.com/p/chromium/issues/detail?id=162491 is finalized
+ * UI for the color chooser that shows on the Android platform as a result of
+ * &lt;input type=color &gt; form element.
*/
-public class ColorPickerDialog extends Dialog {
+public class ColorPickerDialog extends AlertDialog implements OnColorChangedListener {
+ private final ColorPickerAdvanced mAdvancedColorPicker;
- public interface OnColorChangedListener {
- void colorChanged(int color);
- }
+ private final ColorPickerSimple mSimpleColorPicker;
- private OnColorChangedListener mListener;
- private int mInitialColor;
-
- private static class ColorPickerView extends View {
- private static final int CENTER_RADIUS = 32;
- private static final int DIALOG_HEIGHT = 200;
- private static final int BOUNDING_BOX_EDGE = 100;
- private static final float PI = 3.1415926f;
-
- private final Paint mPaint;
- private final Paint mCenterPaint;
- private final int[] mColors;
- private final OnColorChangedListener mListener;
- private boolean mTrackingCenter;
- private boolean mHighlightCenter;
-
- private int center_x = -1;
- private int center_y = -1;
-
- ColorPickerView(Context c, OnColorChangedListener listener, int color) {
- super(c);
- mListener = listener;
- mColors = new int[] {
- 0xFFFF0000, 0xFFFF00FF, 0xFF0000FF, 0xFF00FFFF, 0xFF00FF00,
- 0xFFFFFF00, 0xFFFF0000
- };
- Shader shader = new SweepGradient(0, 0, mColors, null);
-
- mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- mPaint.setShader(shader);
- mPaint.setStyle(Paint.Style.STROKE);
- mPaint.setStrokeWidth(32);
-
- mCenterPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- mCenterPaint.setColor(color);
- mCenterPaint.setStrokeWidth(5);
- }
+ private final Button mMoreButton;
- @Override
- protected void onDraw(Canvas canvas) {
- if (center_x == -1) {
- center_x = getWidth() / 2;
- }
- if (center_y == -1) {
- center_y = getHeight() / 2;
- }
+ // The view up in the corner that shows the user the color they've currently selected.
+ private final View mCurrentColorView;
- float r = BOUNDING_BOX_EDGE - mPaint.getStrokeWidth() * 0.5f;
+ private final OnColorChangedListener mListener;
- canvas.translate(center_x, center_y);
+ private final int mInitialColor;
- canvas.drawOval(new RectF(-r, -r, r, r), mPaint);
- canvas.drawCircle(0, 0, CENTER_RADIUS, mCenterPaint);
+ private int mCurrentColor;
- if (mTrackingCenter) {
- int color = mCenterPaint.getColor();
- mCenterPaint.setStyle(Paint.Style.STROKE);
+ /**
+ * @param context The context the dialog is to run in.
+ * @param theme The theme to display the dialog in.
+ * @param listener The object to notify when the color is set.
+ * @param color The initial color to set.
+ */
+ public ColorPickerDialog(Context context, OnColorChangedListener listener, int color) {
+ super(context, 0);
- if (mHighlightCenter) {
- mCenterPaint.setAlpha(0xFF);
- } else {
- mCenterPaint.setAlpha(0x80);
- }
- canvas.drawCircle(0, 0,
- CENTER_RADIUS + mCenterPaint.getStrokeWidth(),
- mCenterPaint);
+ mListener = listener;
+ mInitialColor = color;
+ mCurrentColor = mInitialColor;
+
+ // Initialize title
+ LayoutInflater inflater = (LayoutInflater) context
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ View title = inflater.inflate(R.layout.color_picker_dialog_title, null);
+ setCustomTitle(title);
+
+ mCurrentColorView = title.findViewById(R.id.selected_color_view);
+
+ TextView titleText = (TextView) title.findViewById(R.id.title);
+ titleText.setText(R.string.color_picker_dialog_title);
+
+ // Initialize Set/Cancel buttons
+ String positiveButtonText = context.getString(R.string.color_picker_button_set);
+ setButton(BUTTON_POSITIVE, positiveButtonText,
+ new Dialog.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+ tryNotifyColorSet(mCurrentColor);
+ }
+ });
+
+ // Note that with the color picker there's not really any such thing as
+ // "cancelled".
+ // The color picker flow only finishes when we return a color, so we
+ // have to always
+ // return something. The concept of "cancelled" in this case just means
+ // returning
+ // the color that we were initialized with.
+ String negativeButtonText = context.getString(R.string.color_picker_button_cancel);
+ setButton(BUTTON_NEGATIVE, negativeButtonText,
+ new Dialog.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialogInterface, int i) {
+ tryNotifyColorSet(mInitialColor);
+ }
+ });
- mCenterPaint.setStyle(Paint.Style.FILL);
- mCenterPaint.setColor(color);
+ setOnCancelListener(new DialogInterface.OnCancelListener() {
+ @Override
+ public void onCancel(DialogInterface arg0) {
+ tryNotifyColorSet(mInitialColor);
}
- }
+ });
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- setMeasuredDimension(widthMeasureSpec, DIALOG_HEIGHT);
- }
-
- private static int interpolate(int low, int high, float interPolant) {
- return low + java.lang.Math.round(interPolant * (high - low));
- }
+ // Initialize main content view
+ View content = inflater.inflate(R.layout.color_picker_dialog_content, null);
+ setView(content);
- static int interpolateColor(int colors[], float x, float y) {
- float angle = (float)java.lang.Math.atan2(y, x);
- float unit = angle / (2 * PI);
- if (unit < 0) {
- unit += 1;
- }
- if (unit <= 0) {
- return colors[0];
- }
- if (unit >= 1) {
- return colors[colors.length - 1];
+ // Initialize More button.
+ mMoreButton = (Button) content.findViewById(R.id.more_colors_button);
+ mMoreButton.setOnClickListener(new Button.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showAdvancedView();
}
+ });
- float p = unit * (colors.length - 1);
- int i = (int)p;
- p -= i;
-
- // Now p is just the fractional part [0...1) and i is the index.
- int c0 = colors[i];
- int c1 = colors[i+1];
- int a = interpolate(Color.alpha(c0), Color.alpha(c1), p);
- int r = interpolate(Color.red(c0), Color.red(c1), p);
- int g = interpolate(Color.green(c0), Color.green(c1), p);
- int b = interpolate(Color.blue(c0), Color.blue(c1), p);
+ // Initialize advanced color view (hidden initially).
+ mAdvancedColorPicker =
+ (ColorPickerAdvanced) content.findViewById(R.id.color_picker_advanced);
+ mAdvancedColorPicker.setVisibility(View.GONE);
- return Color.argb(a, r, g, b);
- }
+ // Initialize simple color view (default view).
+ mSimpleColorPicker = (ColorPickerSimple) content.findViewById(R.id.color_picker_simple);
+ mSimpleColorPicker.init(this);
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- float x = event.getX() - center_x;
- float y = event.getY() - center_y;
-
- // equivalent to sqrt(x * x + y * y) <= CENTER_RADIUS but cheaper
- boolean inCenter = (x * x + y * y) <= (CENTER_RADIUS * CENTER_RADIUS);
-
- switch (event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- mTrackingCenter = inCenter;
- if (inCenter) {
- mHighlightCenter = true;
- invalidate();
- break;
- }
- case MotionEvent.ACTION_MOVE:
- if (mTrackingCenter) {
- if (mHighlightCenter != inCenter) {
- mHighlightCenter = inCenter;
- invalidate();
- }
- } else {
- mCenterPaint.setColor(interpolateColor(mColors, x, y));
- invalidate();
- }
- break;
- case MotionEvent.ACTION_UP:
- if (mTrackingCenter) {
- if (inCenter) {
- mListener.colorChanged(mCenterPaint.getColor());
- }
-
- // Draw without the halo surrounding the central circle.
- mTrackingCenter = false;
- invalidate();
- }
- break;
- default:
- break;
- }
- return true;
- }
+ updateCurrentColor(mInitialColor);
}
- public ColorPickerDialog(Context context,
- OnColorChangedListener listener,
- int initialColor) {
- super(context);
-
- mListener = listener;
- mInitialColor = initialColor;
+ /**
+ * Listens to the ColorPicker for when the user has changed the selected color, and
+ * updates the current color (the color shown in the title) accordingly.
+ *
+ * @param color The new color chosen by the user.
+ */
+ @Override
+ public void onColorChanged(int color) {
+ updateCurrentColor(color);
+ }
- setOnCancelListener(new DialogInterface.OnCancelListener() {
- @Override
- public void onCancel(DialogInterface arg0) {
- mListener.colorChanged(mInitialColor);
- }
- });
+ /**
+ * Hides the simple view (the default) and shows the advanced one instead, hiding the
+ * "More" button at the same time.
+ */
+ private void showAdvancedView() {
+ // Only need to hide the borders, not the Views themselves, since the Views are
+ // contained within the borders.
+ View buttonBorder = findViewById(R.id.more_colors_button_border);
+ buttonBorder.setVisibility(View.GONE);
+
+ View simpleViewBorder = findViewById(R.id.color_picker_simple_border);
+ simpleViewBorder.setVisibility(View.GONE);
+
+ mAdvancedColorPicker.setVisibility(View.VISIBLE);
+ mAdvancedColorPicker.setListener(this);
+ mAdvancedColorPicker.setColor(mCurrentColor);
}
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(new ColorPickerView(getContext(), mListener, mInitialColor));
+ /**
+ * Tries to notify any listeners that the color has been set.
+ */
+ private void tryNotifyColorSet(int color) {
+ if (mListener != null) {
+ mListener.onColorChanged(color);
+ }
+ }
- // TODO(miguelg): Internationalization
- setTitle("Select Color");
+ /**
+ * Updates the internal cache of the currently selected color, updating the colorful little
+ * box in the title at the same time.
+ */
+ private void updateCurrentColor(int color) {
+ mCurrentColor = color;
+ if (mCurrentColorView != null) {
+ mCurrentColorView.setBackgroundColor(color);
+ }
}
}
diff --git a/ui/android/java/src/org/chromium/ui/ColorPickerSimple.java b/ui/android/java/src/org/chromium/ui/ColorPickerSimple.java
new file mode 100644
index 0000000000..5c0382e4a8
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/ColorPickerSimple.java
@@ -0,0 +1,146 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+package org.chromium.ui;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+
+
+/**
+ * Draws a grid of (predefined) colors and allows the user to choose one of
+ * those colors.
+ */
+public class ColorPickerSimple extends View {
+ private static final int ROW_COUNT = 2;
+
+ private static final int COLUMN_COUNT = 4;
+
+ private static final int GRID_CELL_COUNT = ROW_COUNT * COLUMN_COUNT;
+
+ private static final int[] COLORS = { Color.RED,
+ Color.CYAN,
+ Color.BLUE,
+ Color.GREEN,
+ Color.MAGENTA,
+ Color.YELLOW,
+ Color.BLACK,
+ Color.WHITE
+ };
+
+ private Rect[] mBounds;
+
+ private Paint[] mPaints;
+
+ private OnColorChangedListener mOnColorTouchedListener;
+
+ public ColorPickerSimple(Context context) {
+ super(context);
+ }
+
+ public ColorPickerSimple(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public ColorPickerSimple(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ /**
+ * Initializes the listener and precalculates the grid and color positions.
+ *
+ * @param onColorChangedListener The listener that gets notified when the user touches
+ * a color.
+ */
+ public void init(OnColorChangedListener onColorChangedListener) {
+ mOnColorTouchedListener = onColorChangedListener;
+
+ // This will get calculated when the layout size is updated.
+ mBounds = null;
+
+ mPaints = new Paint[GRID_CELL_COUNT];
+ for (int i = 0; i < GRID_CELL_COUNT; ++i) {
+ Paint newPaint = new Paint();
+ newPaint.setColor(COLORS[i]);
+ mPaints[i] = newPaint;
+ }
+ }
+
+ /**
+ * Draws the grid of colors, based on the rectangles calculated in onSizeChanged().
+ *
+ * @param canvas The canvas the colors are drawn onto.
+ */
+ @Override
+ public void onDraw(Canvas canvas) {
+ if (mBounds == null || mPaints == null) {
+ return;
+ }
+ for (int i = 0; i < GRID_CELL_COUNT; ++i) {
+ canvas.drawRect(mBounds[i], mPaints[i]);
+ }
+ }
+
+ /**
+ * Responds to the user touching the grid and works out which color has been chosen as
+ * a result, depending on the X,Y coordinate.
+ *
+ * @param event The MotionEvent the X,Y coordinates are retrieved from.
+ */
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (event.getAction() != MotionEvent.ACTION_DOWN ||
+ mOnColorTouchedListener == null) {
+ return false;
+ }
+
+ if ((getWidth() > 0) && (getHeight() > 0)) {
+ int x = (int) event.getX();
+ int y = (int) event.getY();
+
+ int column = x * COLUMN_COUNT / getWidth();
+ int row = y * ROW_COUNT / getHeight();
+
+ int colorIndex = (row * COLUMN_COUNT) + column;
+ if (colorIndex >= 0 && colorIndex < COLORS.length) {
+ mOnColorTouchedListener.onColorChanged(COLORS[colorIndex]);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Recalculates the color grid with the new sizes.
+ */
+ @Override
+ protected void onSizeChanged(int width, int height, int oldw, int oldh) {
+ calculateGrid(width, height);
+ }
+
+ /**
+ * Calculates the sizes and positions of the cells in the grid, splitting
+ * them up as evenly as possible.
+ */
+ private void calculateGrid(final int width, final int height) {
+ mBounds = new Rect[GRID_CELL_COUNT];
+
+ for (int i = 0; i < ROW_COUNT; ++i) {
+ for (int j = 0; j < COLUMN_COUNT; ++j) {
+ int left = j * width / COLUMN_COUNT;
+ int right = (j + 1) * width / COLUMN_COUNT;
+
+ int top = i * height / ROW_COUNT;
+ int bottom = (i + 1) * height / ROW_COUNT;
+
+ Rect rect = new Rect(left, top, right, bottom);
+ mBounds[(i * COLUMN_COUNT) + j] = rect;
+ }
+ }
+ }
+}
diff --git a/ui/android/java/src/org/chromium/ui/OnColorChangedListener.java b/ui/android/java/src/org/chromium/ui/OnColorChangedListener.java
new file mode 100644
index 0000000000..4caa3cf05b
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/OnColorChangedListener.java
@@ -0,0 +1,17 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+package org.chromium.ui;
+
+/**
+ * The callback used to indicate the user changed the color.
+ */
+public interface OnColorChangedListener {
+
+ /**
+ * Called upon a color change.
+ *
+ * @param color The color that was set.
+ */
+ void onColorChanged(int color);
+} \ No newline at end of file
diff --git a/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java b/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java
index b133931ae0..088c9c2476 100644
--- a/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java
+++ b/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java
@@ -7,7 +7,6 @@ package org.chromium.ui.gfx;
import android.content.Context;
import android.graphics.PixelFormat;
import android.os.Build;
-import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
@@ -25,11 +24,13 @@ import org.chromium.base.JNINamespace;
@JNINamespace("gfx")
public class DeviceDisplayInfo {
- private WindowManager mWinManager;
+
+ private final Context mAppContext;
+ private final WindowManager mWinManager;
private DeviceDisplayInfo(Context context) {
- Context appContext = context.getApplicationContext();
- mWinManager = (WindowManager) appContext.getSystemService(Context.WINDOW_SERVICE);
+ mAppContext = context.getApplicationContext();
+ mWinManager = (WindowManager) mAppContext.getSystemService(Context.WINDOW_SERVICE);
}
/**
@@ -114,24 +115,12 @@ public class DeviceDisplayInfo {
return getMetrics().density;
}
- /**
- * @return Display refresh rate in frames per second.
- */
- @CalledByNative
- public double getRefreshRate() {
- double result = getDisplay().getRefreshRate();
- // Sanity check.
- return (result >= 61 || result < 30) ? 0 : result;
- }
-
private Display getDisplay() {
return mWinManager.getDefaultDisplay();
}
private DisplayMetrics getMetrics() {
- DisplayMetrics metrics = new DisplayMetrics();
- getDisplay().getMetrics(metrics);
- return metrics;
+ return mAppContext.getResources().getDisplayMetrics();
}
/**
diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/strings/android_ui_strings.grd
index da7ffd014f..da7eee267d 100644
--- a/ui/android/java/strings/android_ui_strings.grd
+++ b/ui/android/java/strings/android_ui_strings.grd
@@ -8,6 +8,27 @@
<message desc="Toast when the browser is unable to open a file for upload. [CHAR-LIMIT=32]" name="IDS_OPENING_FILE_ERROR">
Failed to open selected file
</message>
+ <message desc="Text for ColorPicker button to go to advanced view. [CHAR-LIMIT=20]" name="IDS_COLOR_PICKER_BUTTON_MORE">
+ More
+ </message>
+ <message desc="Label for hue slider in ColorPicker." name="IDS_COLOR_PICKER_HUE">
+ Hue
+ </message>
+ <message desc="Label for saturation slider in ColorPicker." name="IDS_COLOR_PICKER_SATURATION">
+ Saturation
+ </message>
+ <message desc="Label for lightness slider in ColorPicker" name="IDS_COLOR_PICKER_LIGHTNESS">
+ Lightness
+ </message>
+ <message desc="Label for button in ColorPicker dialog for user to accept the currently chosen color. [CHAR-LIMIT=20]" name="IDS_COLOR_PICKER_BUTTON_SET">
+ Set
+ </message>
+ <message desc="Label for button in ColorPicker dialog for user to cancel picking a color. [CHAR-LIMIT=20]" name="IDS_COLOR_PICKER_BUTTON_CANCEL">
+ Cancel
+ </message>
+ <message desc="Title of ColorPicker dialog. [CHAR-LIMIT=20]" name="IDS_COLOR_PICKER_DIALOG_TITLE">
+ Select color
+ </message>
</messages>
</release>
<translations>
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 8479ff70cb..60f21cf57e 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -50,6 +50,8 @@
'cocoa/apps_grid_view_item.h',
'cocoa/apps_grid_view_item.mm',
'cocoa/apps_pagination_model_observer.h',
+ 'cocoa/apps_search_box_controller.h',
+ 'cocoa/apps_search_box_controller.mm',
'cocoa/item_drag_controller.h',
'cocoa/item_drag_controller.mm',
'cocoa/scroll_view_with_no_scrollbars.h',
@@ -143,7 +145,6 @@
'../../skia/skia.gyp:skia',
'../../testing/gtest.gyp:gtest',
'../compositor/compositor.gyp:compositor',
- '../compositor/compositor.gyp:compositor_test_support',
'../ui.gyp:run_ui_unittests',
'app_list',
],
@@ -156,6 +157,7 @@
'cocoa/app_list_view_controller_unittest.mm',
'cocoa/app_list_window_controller_unittest.mm',
'cocoa/apps_grid_controller_unittest.mm',
+ 'cocoa/apps_search_box_controller_unittest.mm',
'cocoa/test/apps_grid_controller_test_helper.h',
'cocoa/test/apps_grid_controller_test_helper.mm',
'views/apps_grid_view_unittest.cc',
diff --git a/ui/app_list/app_list_constants.cc b/ui/app_list/app_list_constants.cc
index 116dab60a1..a83c7dd1d1 100644
--- a/ui/app_list/app_list_constants.cc
+++ b/ui/app_list/app_list_constants.cc
@@ -7,6 +7,9 @@
namespace app_list {
const SkColor kContentsBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5);
+const SkColor kSearchBoxBackground = SK_ColorWHITE;
+const SkColor kTopSeparatorColor = SkColorSetRGB(0xE5, 0xE5, 0xE5);
+
// 6% black over kContentsBackgroundColor
const SkColor kHighlightedColor = SkColorSetRGB(0xE6, 0xE6, 0xE6);
// 10% black over kContentsBackgroundColor
diff --git a/ui/app_list/app_list_constants.h b/ui/app_list/app_list_constants.h
index ac85f28c5f..13d206e4c9 100644
--- a/ui/app_list/app_list_constants.h
+++ b/ui/app_list/app_list_constants.h
@@ -12,6 +12,9 @@
namespace app_list {
APP_LIST_EXPORT extern const SkColor kContentsBackgroundColor;
+APP_LIST_EXPORT extern const SkColor kSearchBoxBackground;
+APP_LIST_EXPORT extern const SkColor kTopSeparatorColor;
+
APP_LIST_EXPORT extern const SkColor kHighlightedColor;
APP_LIST_EXPORT extern const SkColor kSelectedColor;
diff --git a/ui/app_list/cocoa/app_list_view_controller.h b/ui/app_list/cocoa/app_list_view_controller.h
index 80095423bb..40d68e39c3 100644
--- a/ui/app_list/cocoa/app_list_view_controller.h
+++ b/ui/app_list/cocoa/app_list_view_controller.h
@@ -11,23 +11,27 @@
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_export.h"
#import "ui/app_list/cocoa/apps_pagination_model_observer.h"
+#import "ui/app_list/cocoa/apps_search_box_controller.h"
namespace app_list {
class AppListViewDelegate;
+class AppListModel;
}
-@class AppsGridController;
@class AppListPagerView;
+@class AppsGridController;
// Controller for the top-level view of the app list UI. It creates and hosts an
-// AppsGridController (displaying an AppListModel), and pager control for
-// navigating between pages in the grid.
+// AppsGridController (displaying an AppListModel), pager control to navigate
+// between pages in the grid, and search entry box.
APP_LIST_EXPORT
-@interface AppListViewController :
- NSViewController<AppsPaginationModelObserver, NSTextFieldDelegate> {
+@interface AppListViewController : NSViewController<AppsPaginationModelObserver,
+ AppsSearchBoxDelegate> {
@private
scoped_nsobject<AppsGridController> appsGridController_;
scoped_nsobject<AppListPagerView> pagerControl_;
+ scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_;
+ scoped_nsobject<NSView> contentsView_;
scoped_ptr<app_list::AppListViewDelegate> delegate_;
}
@@ -41,4 +45,11 @@ APP_LIST_EXPORT
@end
+@interface AppListViewController (TestingAPI)
+
+- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate
+ withTestModel:(scoped_ptr<app_list::AppListModel>)newModel;
+
+@end
+
#endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_
diff --git a/ui/app_list/cocoa/app_list_view_controller.mm b/ui/app_list/cocoa/app_list_view_controller.mm
index 7bfd2d592a..91d82dad28 100644
--- a/ui/app_list/cocoa/app_list_view_controller.mm
+++ b/ui/app_list/cocoa/app_list_view_controller.mm
@@ -7,9 +7,12 @@
#include "base/mac/foundation_util.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/app_list/app_list_constants.h"
+#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_view_delegate.h"
#import "ui/app_list/cocoa/app_list_pager_view.h"
#import "ui/app_list/cocoa/apps_grid_controller.h"
+#import "ui/base/cocoa/flipped_view.h"
+#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
namespace {
@@ -19,13 +22,11 @@ const CGFloat kBubbleCornerRadius = 3;
// Height of the pager.
const CGFloat kPagerPreferredHeight = 57;
-// Padding between the top of the grid and the top of the view.
-// TODO(tapted): Update padding when the search entry control is added.
-const CGFloat kTopPadding = 16;
+// Height of separator line drawn between the searchbox and grid view.
+const CGFloat kTopSeparatorSize = 1;
-// Height of the search input. TODO(tapted): Make this visible when the search
-// input UI is written.
-const CGFloat kSearchInputHeight = 0;
+// Height of the search input.
+const CGFloat kSearchInputHeight = 48;
// Minimum margin on either side of the pager. If the pager grows beyond this,
// the segment size is reduced.
@@ -35,23 +36,29 @@ const CGFloat kMaxSegmentWidth = 80;
} // namespace
-@interface BackgroundView : NSView;
+@interface BackgroundView : FlippedView;
@end
@implementation BackgroundView
- (void)drawRect:(NSRect)dirtyRect {
- [NSGraphicsContext saveGraphicsState];
- [gfx::SkColorToCalibratedNSColor(app_list::kContentsBackgroundColor) set];
- [[NSBezierPath bezierPathWithRoundedRect:[self bounds]
+ gfx::ScopedNSGraphicsContextSaveGState context;
+ NSRect boundsRect = [self bounds];
+ NSRect searchAreaRect = NSMakeRect(0, 0,
+ NSWidth(boundsRect), kSearchInputHeight);
+ NSRect separatorRect = NSMakeRect(0, NSMaxY(searchAreaRect),
+ NSWidth(boundsRect), kTopSeparatorSize);
+
+ [[NSBezierPath bezierPathWithRoundedRect:boundsRect
xRadius:kBubbleCornerRadius
yRadius:kBubbleCornerRadius] addClip];
- NSRectFill([self bounds]);
- [NSGraphicsContext restoreGraphicsState];
-}
-- (BOOL)isFlipped {
- return YES;
+ [gfx::SkColorToCalibratedNSColor(app_list::kContentsBackgroundColor) set];
+ NSRectFill(boundsRect);
+ [gfx::SkColorToCalibratedNSColor(app_list::kSearchBoxBackground) set];
+ NSRectFill(searchAreaRect);
+ [gfx::SkColorToCalibratedNSColor(app_list::kTopSeparatorColor) set];
+ NSRectFill(separatorRect);
}
@end
@@ -97,9 +104,22 @@ const CGFloat kMaxSegmentWidth = 80;
return delegate_.get();
}
-- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate {
+- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate
+ withTestModel:(scoped_ptr<app_list::AppListModel>)newModel {
+ if (delegate_) {
+ // First clean up, in reverse order.
+ [appsSearchBoxController_ setDelegate:nil];
+ }
delegate_.reset(newDelegate.release());
[appsGridController_ setDelegate:delegate_.get()];
+ if (newModel.get())
+ [appsGridController_ setModel:newModel.Pass()];
+ [appsSearchBoxController_ setDelegate:self];
+}
+
+- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate {
+ [self setDelegate:newDelegate.Pass()
+ withTestModel:scoped_ptr<app_list::AppListModel>()];
}
-(void)loadAndSetView {
@@ -107,22 +127,23 @@ const CGFloat kMaxSegmentWidth = 80;
[pagerControl_ setTarget:appsGridController_];
[pagerControl_ setAction:@selector(onPagerClicked:)];
- [[appsGridController_ view] setFrameOrigin:NSMakePoint(0, kTopPadding)];
+ NSRect gridFrame = [[appsGridController_ view] frame];
+ NSRect contentsRect = NSMakeRect(0, kSearchInputHeight + kTopSeparatorSize,
+ NSWidth(gridFrame), NSHeight(gridFrame) + kPagerPreferredHeight -
+ [AppsGridController scrollerPadding]);
- NSRect backgroundRect = [[appsGridController_ view] bounds];
- backgroundRect.size.height += kPagerPreferredHeight;
+ contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]);
scoped_nsobject<BackgroundView> backgroundView(
- [[BackgroundView alloc] initWithFrame:backgroundRect]);
-
- NSRect searchInputRect =
- NSMakeRect(0, 0, backgroundRect.size.width, kSearchInputHeight);
- scoped_nsobject<NSTextField> searchInput(
- [[NSTextField alloc] initWithFrame:searchInputRect]);
- [searchInput setDelegate:self];
-
- [backgroundView addSubview:[appsGridController_ view]];
- [backgroundView addSubview:pagerControl_];
- [backgroundView addSubview:searchInput];
+ [[BackgroundView alloc] initWithFrame:
+ NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]);
+ appsSearchBoxController_.reset(
+ [[AppsSearchBoxController alloc] initWithFrame:
+ NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]);
+
+ [contentsView_ addSubview:[appsGridController_ view]];
+ [contentsView_ addSubview:pagerControl_];
+ [backgroundView addSubview:contentsView_];
+ [backgroundView addSubview:[appsSearchBoxController_ view]];
[self setView:backgroundView];
}
@@ -130,7 +151,7 @@ const CGFloat kMaxSegmentWidth = 80;
size_t pageCount = [appsGridController_ pageCount];
[pagerControl_ setSegmentCount:pageCount];
- NSRect viewFrame = [[self view] bounds];
+ NSRect viewFrame = [[pagerControl_ superview] bounds];
CGFloat segmentWidth = std::min(
kMaxSegmentWidth,
(viewFrame.size.width - 2 * kMinPagerMargin) / pageCount);
@@ -163,9 +184,17 @@ const CGFloat kMaxSegmentWidth = 80;
return [pagerControl_ findAndHighlightSegmentAtLocation:locationInWindow];
}
+- (app_list::SearchBoxModel*)searchBoxModel {
+ app_list::AppListModel* appListModel = [appsGridController_ model];
+ return appListModel ? appListModel->search_box() : NULL;
+}
+
- (BOOL)control:(NSControl*)control
textView:(NSTextView*)textView
doCommandBySelector:(SEL)command {
+ // TODO(tapted): If showing search results, first pass up/down navigation to
+ // the search results controller.
+
// If anything has been written, let the search view handle it.
if ([[control stringValue] length] > 0)
return NO;
@@ -183,4 +212,14 @@ const CGFloat kMaxSegmentWidth = 80;
return [appsGridController_ handleCommandBySelector:command];
}
+- (void)modelTextDidChange {
+ app_list::SearchBoxModel* searchBoxModel = [self searchBoxModel];
+ if (!searchBoxModel || !delegate_)
+ return;
+
+ // TODO(tapted): If there is a non-empty query in |searchBoxModel| reveal the
+ // search results, and run delegate_->StartSearch(). Or, if the query is now
+ // empty, hide results and run delegate_->StopSearch().
+}
+
@end
diff --git a/ui/app_list/cocoa/app_list_view_controller_unittest.mm b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
index eb3a807548..566819e369 100644
--- a/ui/app_list/cocoa/app_list_view_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
@@ -19,10 +19,7 @@ class AppListViewControllerTest : public AppsGridControllerTestHelper {
virtual void SetUp() OVERRIDE {
app_list_view_controller_.reset([[AppListViewController alloc] init]);
- [app_list_view_controller_ setDelegate:
- delegate_.PassAs<AppListViewDelegate>()];
SetUpWithGridController([app_list_view_controller_ appsGridController]);
-
[[test_window() contentView] addSubview:[app_list_view_controller_ view]];
}
@@ -33,6 +30,12 @@ class AppListViewControllerTest : public AppsGridControllerTestHelper {
AppsGridControllerTestHelper::TearDown();
}
+ virtual void ResetModel(scoped_ptr<AppListModel> new_model) OVERRIDE {
+ scoped_ptr<AppListViewDelegate> delegate_(new AppListTestViewDelegate);
+ [app_list_view_controller_ setDelegate:delegate_.Pass()
+ withTestModel:new_model.Pass()];
+ }
+
protected:
scoped_nsobject<AppListViewController> app_list_view_controller_;
diff --git a/ui/app_list/cocoa/apps_grid_controller.h b/ui/app_list/cocoa/apps_grid_controller.h
index 4fb2d6e4fb..7db9fbf4bb 100644
--- a/ui/app_list/cocoa/apps_grid_controller.h
+++ b/ui/app_list/cocoa/apps_grid_controller.h
@@ -54,6 +54,10 @@ APP_LIST_EXPORT
+ (void)setScrollAnimationDuration:(NSTimeInterval)duration;
+// The amount the grid view has been extended to hold the sometimes present
+// invisible scroller that allows for gesture scrolling.
++ (CGFloat)scrollerPadding;
+
- (NSCollectionView*)collectionViewAtPageIndex:(size_t)pageIndex;
- (size_t)pageIndexForCollectionView:(NSCollectionView*)page;
diff --git a/ui/app_list/cocoa/apps_grid_controller.mm b/ui/app_list/cocoa/apps_grid_controller.mm
index 6a47ed4317..6d556426f4 100644
--- a/ui/app_list/cocoa/apps_grid_controller.mm
+++ b/ui/app_list/cocoa/apps_grid_controller.mm
@@ -21,6 +21,7 @@ const int kFixedColumns = 4;
const int kItemsPerPage = kFixedRows * kFixedColumns;
// Padding space in pixels for fixed layout.
+const CGFloat kGridTopPadding = 1;
const CGFloat kLeftRightPadding = 16;
const CGFloat kScrollerPadding = 16;
@@ -142,6 +143,10 @@ class AppsGridDelegateBridge : public ui::ListModelObserver {
g_scroll_duration = duration;
}
++ (CGFloat)scrollerPadding {
+ return kScrollerPadding;
+}
+
@synthesize paginationObserver = paginationObserver_;
- (id)init {
@@ -338,7 +343,7 @@ class AppsGridDelegateBridge : public ui::ListModelObserver {
scoped_nsobject<PageContainerView> pagesContainer(
[[PageContainerView alloc] initWithFrame:NSZeroRect]);
- NSRect scrollFrame = NSMakeRect(0, 0, kViewWidth,
+ NSRect scrollFrame = NSMakeRect(0, kGridTopPadding, kViewWidth,
kViewHeight + kScrollerPadding);
scoped_nsobject<ScrollViewWithNoScrollbars> scrollView(
[[ScrollViewWithNoScrollbars alloc] initWithFrame:scrollFrame]);
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index fe52e8c3ef..b5876bcf27 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -80,9 +80,14 @@ class AppsGridControllerTest : public AppsGridControllerTestHelper {
public:
AppsGridControllerTest() {}
+ AppListTestViewDelegate* delegate() {
+ return owned_delegate_.get();
+ }
+
virtual void SetUp() OVERRIDE {
owned_apps_grid_controller_.reset([[AppsGridController alloc] init]);
- [owned_apps_grid_controller_ setDelegate:delegate_.get()];
+ owned_delegate_.reset(new AppListTestViewDelegate);
+ [owned_apps_grid_controller_ setDelegate:owned_delegate_.get()];
AppsGridControllerTestHelper::SetUpWithGridController(
owned_apps_grid_controller_.get());
@@ -98,6 +103,7 @@ class AppsGridControllerTest : public AppsGridControllerTestHelper {
private:
scoped_nsobject<AppsGridController> owned_apps_grid_controller_;
+ scoped_ptr<AppListTestViewDelegate> owned_delegate_;
DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest);
};
diff --git a/ui/app_list/cocoa/apps_search_box_controller.h b/ui/app_list/cocoa/apps_search_box_controller.h
new file mode 100644
index 0000000000..8f048e8a56
--- /dev/null
+++ b/ui/app_list/cocoa/apps_search_box_controller.h
@@ -0,0 +1,52 @@
+// Copyright 2013 The Chromium Authors. 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_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
+#define UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/app_list/app_list_export.h"
+
+namespace app_list {
+class SearchBoxModel;
+class SearchBoxModelObserverBridge;
+}
+
+@class SearchTextField;
+
+@protocol AppsSearchBoxDelegate<NSTextFieldDelegate>
+
+- (app_list::SearchBoxModel*)searchBoxModel;
+- (void)modelTextDidChange;
+
+@end
+
+// Controller for the search box in the topmost portion of the app list.
+APP_LIST_EXPORT
+@interface AppsSearchBoxController : NSViewController<NSTextFieldDelegate> {
+ @private
+ scoped_nsobject<SearchTextField> searchTextField_;
+ scoped_nsobject<NSImageView> searchImageView_;
+ scoped_ptr<app_list::SearchBoxModelObserverBridge> bridge_;
+
+ id<AppsSearchBoxDelegate> delegate_; // Weak. Owns us.
+}
+
+@property(assign, nonatomic) id<AppsSearchBoxDelegate> delegate;
+
+- (id)initWithFrame:(NSRect)frame;
+- (void)clearSearch;
+
+@end
+
+@interface AppsSearchBoxController (TestingAPI)
+
+- (NSTextField*)searchTextField;
+
+@end
+
+#endif // UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
new file mode 100644
index 0000000000..ad35dbaee1
--- /dev/null
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -0,0 +1,293 @@
+// Copyright 2013 The Chromium 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 "ui/app_list/cocoa/apps_search_box_controller.h"
+
+#include "base/mac/foundation_util.h"
+#include "base/strings/sys_string_conversions.h"
+#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
+#include "ui/app_list/search_box_model.h"
+#include "ui/app_list/search_box_model_observer.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/image/image_skia_util_mac.h"
+
+namespace {
+
+// Padding either side of the search icon.
+const CGFloat kPadding = 14;
+
+// Size of the search icon.
+const CGFloat kSearchIconDimension = 32;
+
+}
+
+@interface AppsSearchBoxController ()
+
+- (NSImageView*)searchImageView;
+- (void)addSubviews;
+
+@end
+
+namespace app_list {
+
+class SearchBoxModelObserverBridge : public SearchBoxModelObserver {
+ public:
+ SearchBoxModelObserverBridge(AppsSearchBoxController* parent);
+ virtual ~SearchBoxModelObserverBridge();
+
+ void SetSearchText(const string16& text);
+
+ virtual void IconChanged() OVERRIDE;
+ virtual void HintTextChanged() OVERRIDE;
+ virtual void SelectionModelChanged() OVERRIDE;
+ virtual void TextChanged() OVERRIDE;
+
+ private:
+ SearchBoxModel* GetModel();
+
+ AppsSearchBoxController* parent_; // Weak. Owns us.
+
+ DISALLOW_COPY_AND_ASSIGN(SearchBoxModelObserverBridge);
+};
+
+SearchBoxModelObserverBridge::SearchBoxModelObserverBridge(
+ AppsSearchBoxController* parent)
+ : parent_(parent) {
+ IconChanged();
+ HintTextChanged();
+ GetModel()->AddObserver(this);
+}
+
+SearchBoxModelObserverBridge::~SearchBoxModelObserverBridge() {
+ GetModel()->RemoveObserver(this);
+}
+
+SearchBoxModel* SearchBoxModelObserverBridge::GetModel() {
+ SearchBoxModel* searchBoxModel = [[parent_ delegate] searchBoxModel];
+ DCHECK(searchBoxModel);
+ return searchBoxModel;
+}
+
+void SearchBoxModelObserverBridge::SetSearchText(const string16& text) {
+ SearchBoxModel* model = GetModel();
+ model->RemoveObserver(this);
+ model->SetText(text);
+ // TODO(tapted): See if this should call SetSelectionModel here.
+ model->AddObserver(this);
+}
+
+void SearchBoxModelObserverBridge::IconChanged() {
+ [[parent_ searchImageView]
+ setImage:gfx::NSImageFromImageSkia(GetModel()->icon())];
+}
+
+void SearchBoxModelObserverBridge::HintTextChanged() {
+ [[[parent_ searchTextField] cell] setPlaceholderString:
+ base::SysUTF16ToNSString(GetModel()->hint_text())];
+}
+
+void SearchBoxModelObserverBridge::SelectionModelChanged() {
+ // TODO(tapted): See if anything needs to be done here for RTL.
+}
+
+void SearchBoxModelObserverBridge::TextChanged() {
+ // Currently the model text is only changed when we are not observing it, or
+ // it is changed in tests to establish a particular state.
+ [[parent_ searchTextField]
+ setStringValue:base::SysUTF16ToNSString(GetModel()->text())];
+}
+
+} // namespace app_list
+
+@interface SearchTextField : NSTextField {
+ @private
+ NSRect textFrameInset_;
+}
+
+@property(readonly, nonatomic) NSRect textFrameInset;
+
+- (void)setMarginsWithLeftMargin:(CGFloat)leftMargin
+ rightMargin:(CGFloat)rightMargin;
+
+@end
+
+@implementation AppsSearchBoxController
+
+@synthesize delegate = delegate_;
+
+- (id)initWithFrame:(NSRect)frame {
+ if ((self = [super init])) {
+ scoped_nsobject<NSView> containerView([[NSView alloc] initWithFrame:frame]);
+ [self setView:containerView];
+ [self addSubviews];
+ }
+ return self;
+}
+
+- (void)clearSearch {
+ [searchTextField_ setStringValue:@""];
+ [self controlTextDidChange:nil];
+}
+
+- (void)setDelegate:(id<AppsSearchBoxDelegate>)delegate {
+ bridge_.reset(); // Ensure observers are cleared before updating |delegate_|.
+ delegate_ = delegate;
+ if (!delegate_)
+ return;
+
+ bridge_.reset(new app_list::SearchBoxModelObserverBridge(self));
+}
+
+- (NSTextField*)searchTextField {
+ return searchTextField_;
+}
+
+- (NSImageView*)searchImageView {
+ return searchImageView_;
+}
+
+- (void)addSubviews {
+ NSRect viewBounds = [[self view] bounds];
+ searchImageView_.reset([[NSImageView alloc] initWithFrame:NSMakeRect(
+ kPadding, 0, kSearchIconDimension, NSHeight(viewBounds))]);
+
+ searchTextField_.reset([[SearchTextField alloc] initWithFrame:viewBounds]);
+ [searchTextField_ setDelegate:self];
+ [searchTextField_ setFont:ui::ResourceBundle::GetSharedInstance().GetFont(
+ ui::ResourceBundle::MediumFont).GetNativeFont()];
+ [searchTextField_
+ setMarginsWithLeftMargin:NSMaxX([searchImageView_ frame]) + kPadding
+ rightMargin:kPadding];
+
+ [[self view] addSubview:searchImageView_];
+ [[self view] addSubview:searchTextField_];
+}
+
+- (BOOL)control:(NSControl*)control
+ textView:(NSTextView*)textView
+ doCommandBySelector:(SEL)command {
+ // Forward the message first, to handle grid or search results navigation.
+ BOOL handled = [delegate_ control:control
+ textView:textView
+ doCommandBySelector:command];
+ if (handled)
+ return YES;
+
+ // If the delegate did not handle the escape key, it means the window was not
+ // dismissed because there were search results. Clear them.
+ if (command == @selector(complete:)) {
+ [self clearSearch];
+ return YES;
+ }
+
+ return NO;
+}
+
+- (void)controlTextDidChange:(NSNotification*)notification {
+ if (bridge_) {
+ bridge_->SetSearchText(
+ base::SysNSStringToUTF16([searchTextField_ stringValue]));
+ }
+
+ [delegate_ modelTextDidChange];
+}
+
+@end
+
+@interface SearchTextFieldCell : NSTextFieldCell;
+
+- (NSRect)textFrameForFrameInternal:(NSRect)cellFrame;
+
+@end
+
+@implementation SearchTextField
+
+@synthesize textFrameInset = textFrameInset_;
+
++ (Class)cellClass {
+ return [SearchTextFieldCell class];
+}
+
+- (id)initWithFrame:(NSRect)theFrame {
+ if ((self = [super initWithFrame:theFrame])) {
+ [self setFocusRingType:NSFocusRingTypeNone];
+ [self setDrawsBackground:NO];
+ [self setBordered:NO];
+ }
+ return self;
+}
+
+- (void)setMarginsWithLeftMargin:(CGFloat)leftMargin
+ rightMargin:(CGFloat)rightMargin {
+ // Find the preferred height for the current text properties, and center.
+ NSRect viewBounds = [self bounds];
+ [self sizeToFit];
+ NSRect textBounds = [self bounds];
+ textFrameInset_.origin.x = leftMargin;
+ textFrameInset_.origin.y = floor(NSMidY(viewBounds) - NSMidY(textBounds));
+ textFrameInset_.size.width = leftMargin + rightMargin;
+ textFrameInset_.size.height = NSHeight(viewBounds) - NSHeight(textBounds);
+ [self setFrame:viewBounds];
+}
+
+@end
+
+@implementation SearchTextFieldCell
+
+- (NSRect)textFrameForFrameInternal:(NSRect)cellFrame {
+ SearchTextField* searchTextField =
+ base::mac::ObjCCastStrict<SearchTextField>([self controlView]);
+ NSRect insetRect = [searchTextField textFrameInset];
+ cellFrame.origin.x += insetRect.origin.x;
+ cellFrame.origin.y += insetRect.origin.y;
+ cellFrame.size.width -= insetRect.size.width;
+ cellFrame.size.height -= insetRect.size.height;
+ return cellFrame;
+}
+
+- (NSRect)textFrameForFrame:(NSRect)cellFrame {
+ return [self textFrameForFrameInternal:cellFrame];
+}
+
+- (NSRect)textCursorFrameForFrame:(NSRect)cellFrame {
+ return [self textFrameForFrameInternal:cellFrame];
+}
+
+- (void)resetCursorRect:(NSRect)cellFrame
+ inView:(NSView*)controlView {
+ [super resetCursorRect:[self textCursorFrameForFrame:cellFrame]
+ inView:controlView];
+}
+
+- (NSRect)drawingRectForBounds:(NSRect)theRect {
+ return [super drawingRectForBounds:[self textFrameForFrame:theRect]];
+}
+
+- (void)editWithFrame:(NSRect)cellFrame
+ inView:(NSView*)controlView
+ editor:(NSText*)editor
+ delegate:(id)delegate
+ event:(NSEvent*)event {
+ [super editWithFrame:[self textFrameForFrame:cellFrame]
+ inView:controlView
+ editor:editor
+ delegate:delegate
+ event:event];
+}
+
+- (void)selectWithFrame:(NSRect)cellFrame
+ inView:(NSView*)controlView
+ editor:(NSText*)editor
+ delegate:(id)delegate
+ start:(NSInteger)start
+ length:(NSInteger)length {
+ [super selectWithFrame:[self textFrameForFrame:cellFrame]
+ inView:controlView
+ editor:editor
+ delegate:delegate
+ start:start
+ length:length];
+}
+
+@end
diff --git a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
new file mode 100644
index 0000000000..ee4768799e
--- /dev/null
+++ b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
@@ -0,0 +1,123 @@
+// Copyright 2013 The Chromium 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 "ui/app_list/cocoa/apps_search_box_controller.h"
+
+#include "base/memory/scoped_nsobject.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#import "testing/gtest_mac.h"
+#include "ui/app_list/search_box_model.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
+
+@interface TestAppsSearchBoxDelegate : NSObject<AppsSearchBoxDelegate> {
+ @private
+ app_list::SearchBoxModel searchBoxModel_;
+ int textChangeCount_;
+}
+
+@property(assign, nonatomic) int textChangeCount;
+
+@end
+
+@implementation TestAppsSearchBoxDelegate
+
+@synthesize textChangeCount = textChangeCount_;
+
+- (app_list::SearchBoxModel*)searchBoxModel {
+ return &searchBoxModel_;
+}
+
+- (BOOL)control:(NSControl*)control
+ textView:(NSTextView*)textView
+ doCommandBySelector:(SEL)command {
+ return NO;
+}
+
+- (void)modelTextDidChange {
+ ++textChangeCount_;
+}
+
+- (CGFloat)bubbleCornerRadius {
+ return 3;
+}
+
+@end
+
+namespace app_list {
+namespace test {
+
+class AppsSearchBoxControllerTest : public ui::CocoaTest {
+ public:
+ AppsSearchBoxControllerTest() {
+ Init();
+ }
+
+ virtual void SetUp() OVERRIDE {
+ apps_search_box_controller_.reset(
+ [[AppsSearchBoxController alloc] initWithFrame:
+ NSMakeRect(0, 0, 400, 100)]);
+ delegate_.reset([[TestAppsSearchBoxDelegate alloc] init]);
+ [apps_search_box_controller_ setDelegate:delegate_];
+
+ ui::CocoaTest::SetUp();
+ [[test_window() contentView] addSubview:[apps_search_box_controller_ view]];
+ }
+
+ virtual void TearDown() OVERRIDE {
+ [apps_search_box_controller_ setDelegate:nil];
+ ui::CocoaTest::TearDown();
+ }
+
+ void SimulateKeyAction(SEL c) {
+ NSControl* control = [apps_search_box_controller_ searchTextField];
+ [apps_search_box_controller_ control:control
+ textView:nil
+ doCommandBySelector:c];
+ }
+
+ protected:
+ scoped_nsobject<TestAppsSearchBoxDelegate> delegate_;
+ scoped_nsobject<AppsSearchBoxController> apps_search_box_controller_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppsSearchBoxControllerTest);
+};
+
+TEST_VIEW(AppsSearchBoxControllerTest, [apps_search_box_controller_ view]);
+
+// Test the search box initialization, and search input and clearing.
+TEST_F(AppsSearchBoxControllerTest, SearchBoxModel) {
+ app_list::SearchBoxModel* model = [delegate_ searchBoxModel];
+ const string16 hit_text(ASCIIToUTF16("hint")); // Usually localized "Search".
+ model->SetHintText(hit_text);
+ EXPECT_NSEQ(base::SysUTF16ToNSString(hit_text),
+ [[[apps_search_box_controller_ searchTextField] cell] placeholderString]);
+
+ const string16 search_text(ASCIIToUTF16("test"));
+ model->SetText(search_text);
+ EXPECT_NSEQ(base::SysUTF16ToNSString(search_text),
+ [[apps_search_box_controller_ searchTextField] stringValue]);
+ // Updates coming via the model should not notify the delegate.
+ EXPECT_EQ(0, [delegate_ textChangeCount]);
+
+ // Updates from the view should update the model and notify the delegate.
+ [apps_search_box_controller_ clearSearch];
+ EXPECT_EQ(string16(), model->text());
+ EXPECT_NSEQ([NSString string],
+ [[apps_search_box_controller_ searchTextField] stringValue]);
+ EXPECT_EQ(1, [delegate_ textChangeCount]);
+
+ // Test pressing escape clears the search.
+ model->SetText(search_text);
+ EXPECT_NSEQ(base::SysUTF16ToNSString(search_text),
+ [[apps_search_box_controller_ searchTextField] stringValue]);
+ SimulateKeyAction(@selector(complete:));
+ EXPECT_NSEQ([NSString string],
+ [[apps_search_box_controller_ searchTextField] stringValue]);
+ EXPECT_EQ(2, [delegate_ textChangeCount]);
+}
+
+} // namespace test
+} // namespace app_list
diff --git a/ui/app_list/cocoa/test/apps_grid_controller_test_helper.h b/ui/app_list/cocoa/test/apps_grid_controller_test_helper.h
index 90a101462e..026a4cd8bb 100644
--- a/ui/app_list/cocoa/test/apps_grid_controller_test_helper.h
+++ b/ui/app_list/cocoa/test/apps_grid_controller_test_helper.h
@@ -12,6 +12,9 @@
@class AppsGridController;
namespace app_list {
+
+class AppListModel;
+
namespace test {
class AppListTestViewDelegate;
@@ -55,10 +58,10 @@ class AppsGridControllerTestHelper : public ui::CocoaTest {
NSCollectionView* GetPageAt(size_t index);
NSView* GetSelectedView();
- AppListTestViewDelegate* delegate();
AppListTestModel* model();
- scoped_ptr<AppListTestViewDelegate> delegate_;
+ virtual void ResetModel(scoped_ptr<AppListModel> model);
+
AppsGridController* apps_grid_controller_;
private:
diff --git a/ui/app_list/cocoa/test/apps_grid_controller_test_helper.mm b/ui/app_list/cocoa/test/apps_grid_controller_test_helper.mm
index 1fb663b817..9023c5fa95 100644
--- a/ui/app_list/cocoa/test/apps_grid_controller_test_helper.mm
+++ b/ui/app_list/cocoa/test/apps_grid_controller_test_helper.mm
@@ -20,7 +20,6 @@ const size_t AppsGridControllerTestHelper::kItemsPerPage = 16;
AppsGridControllerTestHelper::AppsGridControllerTestHelper() {
Init();
- delegate_.reset(new AppListTestViewDelegate);
[AppsGridController setScrollAnimationDuration:0.0];
}
@@ -30,8 +29,7 @@ void AppsGridControllerTestHelper::SetUpWithGridController(
AppsGridController* grid_controller) {
ui::CocoaTest::SetUp();
apps_grid_controller_ = grid_controller;
- scoped_ptr<AppListModel> model(new AppListTestModel);
- [apps_grid_controller_ setModel:model.Pass()];
+ ReplaceTestModel(0);
}
void AppsGridControllerTestHelper::SimulateClick(NSView* view) {
@@ -58,7 +56,12 @@ void AppsGridControllerTestHelper::SimulateMouseExitItemAt(size_t index) {
void AppsGridControllerTestHelper::ReplaceTestModel(int item_count) {
scoped_ptr<AppListTestModel> new_model(new AppListTestModel);
new_model->PopulateApps(item_count);
- [apps_grid_controller_ setModel:new_model.PassAs<AppListModel>()];
+ ResetModel(new_model.PassAs<AppListModel>());
+}
+
+void AppsGridControllerTestHelper::ResetModel(
+ scoped_ptr<AppListModel> new_model) {
+ [apps_grid_controller_ setModel:new_model.Pass()];
}
std::string AppsGridControllerTestHelper::GetViewContent() const {
@@ -126,10 +129,6 @@ NSView* AppsGridControllerTestHelper::GetSelectedView() {
return GetItemViewAt([apps_grid_controller_ selectedItemIndex]);
}
-AppListTestViewDelegate* AppsGridControllerTestHelper::delegate() {
- return static_cast<AppListTestViewDelegate*>(delegate_.get());
-}
-
AppListTestModel* AppsGridControllerTestHelper::model() {
return static_cast<AppListTestModel*>([apps_grid_controller_ model]);
}
diff --git a/ui/app_list/views/app_list_background.cc b/ui/app_list/views/app_list_background.cc
index 9cff9cca65..cc55b5b920 100644
--- a/ui/app_list/views/app_list_background.cc
+++ b/ui/app_list/views/app_list_background.cc
@@ -16,10 +16,7 @@
namespace {
-const SkColor kSearchBoxBackground = SK_ColorWHITE;
-
-// Colors and sizes of top separator between searchbox and grid view.
-const SkColor kTopSeparatorColor = SkColorSetRGB(0xE5, 0xE5, 0xE5);
+// Size of top separator between searchbox and grid view.
const int kTopSeparatorSize = 1;
} // namespace
diff --git a/ui/app_list/views/app_list_drag_and_drop_host.h b/ui/app_list/views/app_list_drag_and_drop_host.h
index ace8804902..7774f94969 100644
--- a/ui/app_list/views/app_list_drag_and_drop_host.h
+++ b/ui/app_list/views/app_list_drag_and_drop_host.h
@@ -9,6 +9,7 @@
namespace gfx {
class Point;
+class Vector2d;
} // namespace gfx
namespace app_list {
@@ -21,10 +22,13 @@ class ApplicationDragAndDropHost {
// The proxy should get created using the |icon| with a magnification of
// |scale_factor| at a center location of |location_in_screen_coordinates.
// Use |replaced_view| to find the screen which is used.
+ // The |cursor_offset_from_center| is the offset from the mouse cursor to
+ // the center of the item.
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) = 0;
// Update the screen location of the Drag icon proxy.
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 06a188a3c3..c397fb0edc 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_item_model.h"
diff --git a/ui/app_list/views/app_list_item_view.h b/ui/app_list/views/app_list_item_view.h
index 1e11bdeb8e..713e36e205 100644
--- a/ui/app_list/views/app_list_item_view.h
+++ b/ui/app_list/views/app_list_item_view.h
@@ -12,6 +12,7 @@
#include "base/timer.h"
#include "ui/app_list/app_list_export.h"
#include "ui/app_list/app_list_item_model_observer.h"
+#include "ui/app_list/views/cached_label.h"
#include "ui/gfx/shadow_value.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/button/custom_button.h"
@@ -28,7 +29,6 @@ namespace app_list {
class AppListItemModel;
class AppsGridView;
-class CachedLabel;
class APP_LIST_EXPORT AppListItemView : public views::CustomButton,
public views::ContextMenuController,
@@ -46,6 +46,8 @@ class APP_LIST_EXPORT AppListItemView : public views::CustomButton,
AppListItemModel* model() const { return model_; }
+ const views::Label* title() const { return title_; }
+
private:
enum UIState {
UI_STATE_NORMAL, // Normal UI (icon + label)
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index dd145ca2d9..c957fc1b0b 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -15,6 +15,7 @@
#include "ui/app_list/views/pulsing_block_view.h"
#include "ui/base/animation/animation.h"
#include "ui/base/events/event.h"
+#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/views/border.h"
#include "ui/views/view_model_utils.h"
#include "ui/views/widget/widget.h"
@@ -191,6 +192,7 @@ void AppsGridView::EnsureViewVisible(const views::View* view) {
void AppsGridView::InitiateDrag(AppListItemView* view,
Pointer pointer,
const ui::LocatedEvent& event) {
+ DCHECK(view);
if (drag_view_ || pulsing_blocks_model_.view_size())
return;
@@ -201,14 +203,19 @@ void AppsGridView::InitiateDrag(AppListItemView* view,
// Note: This code has very likely to be changed for Windows (non metro mode)
// when a |drag_and_drop_host_| gets implemented.
if (drag_and_drop_host_) {
+ // Determine the mouse offset to the center of the icon so that the drag and
+ // drop host follows this layer.
+ gfx::Vector2d delta = event.root_location() -
+ drag_view_->GetBoundsInScreen().CenterPoint();
+ delta.set_y(delta.y() + drag_view_->title()->size().height() / 2);
// We have to hide the original item since the drag and drop host will do
// the OS dependent code to "lift off the dragged item".
- // Note that we cannot use SetVisible since it would remove the mouse input.
- drag_view_->SetSize(gfx::Size());
drag_and_drop_host_->CreateDragIconProxy(event.root_location(),
view->model()->icon(),
drag_view_,
+ delta,
kDragAndDropProxyScale);
+ HideView(drag_view_, true);
}
drag_start_ = event.location();
}
@@ -216,8 +223,11 @@ void AppsGridView::InitiateDrag(AppListItemView* view,
void AppsGridView::UpdateDrag(AppListItemView* view,
Pointer pointer,
const ui::LocatedEvent& event) {
- if (!dragging() && drag_view_ &&
- ExceededDragThreshold(event.location() - drag_start_)) {
+ // EndDrag was called before if |drag_view_| is NULL.
+ if (!drag_view_)
+ return;
+
+ if (!dragging() && ExceededDragThreshold(event.location() - drag_start_)) {
drag_pointer_ = pointer;
// Move the view to the front so that it appears on top of other views.
ReorderChildView(drag_view_, -1);
@@ -244,41 +254,38 @@ void AppsGridView::UpdateDrag(AppListItemView* view,
if (last_drop_target != drop_target_)
AnimateToIdealBounds();
- if (drag_and_drop_host_) {
+ if (drag_and_drop_host_)
drag_and_drop_host_->UpdateDragIconProxy(event.root_location());
- return;
- }
drag_view_->SetPosition(
gfx::PointAtOffsetFromOrigin(last_drag_point_ - drag_start_));
}
void AppsGridView::EndDrag(bool cancel) {
+ // EndDrag was called before if |drag_view_| is NULL.
+ if (!drag_view_)
+ return;
+
if (forward_events_to_drag_and_drop_host_) {
forward_events_to_drag_and_drop_host_ = false;
drag_and_drop_host_->EndDrag(cancel);
- } else if (!cancel && dragging() && drag_view_) {
+ } else if (!cancel && dragging()) {
CalculateDropTarget(last_drag_point_, true);
if (IsValidIndex(drop_target_))
MoveItemInModel(drag_view_, drop_target_);
}
- // In case we had a drag and drop proxy icon, we delete it and make the real
- // item visible again.
if (drag_and_drop_host_) {
+ // If we had a drag and drop proxy icon, we delete it and make the real
+ // item visible again.
drag_and_drop_host_->DestroyDragIconProxy();
- // To avoid an incorrect animation on re-group, |drag_view_| gets positioned
- // at its last known drag location.
- drag_view_->SetPosition(
- gfx::PointAtOffsetFromOrigin(last_drag_point_ - drag_start_));
+ HideView(drag_view_, false);
}
drag_pointer_ = NONE;
drop_target_ = Index();
- if (drag_view_) {
- drag_view_ = NULL;
- AnimateToIdealBounds();
- }
+ drag_view_ = NULL;
+ AnimateToIdealBounds();
page_flip_timer_.Stop();
page_flip_target_ = -1;
@@ -919,4 +926,12 @@ void AppsGridView::OnAppListModelStatusChanged() {
SchedulePaint();
}
+void AppsGridView::HideView(views::View* view, bool hide) {
+#if defined(USE_AURA)
+ ui::ScopedLayerAnimationSettings animator(view->layer()->GetAnimator());
+ animator.SetPreemptionStrategy(ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET);
+ view->layer()->SetOpacity(hide ? 0 : 1);
+#endif
+}
+
} // namespace app_list
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index 8a3f09077f..483f737890 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -207,6 +207,10 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
// Overridden from AppListModelObserver:
virtual void OnAppListModelStatusChanged() OVERRIDE;
+ // Hide a given view temporarily without losing (mouse) events and / or
+ // changing the size of it.
+ void HideView(views::View* view, bool hide);
+
AppListModel* model_; // Owned by AppListView.
AppsGridViewDelegate* delegate_;
PaginationModel* pagination_model_; // Owned by AppListController.
diff --git a/ui/app_list/views/cached_label.cc b/ui/app_list/views/cached_label.cc
index a747b903bd..54884317b8 100644
--- a/ui/app_list/views/cached_label.cc
+++ b/ui/app_list/views/cached_label.cc
@@ -4,7 +4,7 @@
#include "ui/app_list/views/cached_label.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
diff --git a/ui/app_list/views/signin_view.cc b/ui/app_list/views/signin_view.cc
index c5a04b2116..74724e7346 100644
--- a/ui/app_list/views/signin_view.cc
+++ b/ui/app_list/views/signin_view.cc
@@ -8,7 +8,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font.h"
#include "ui/views/background.h"
-#include "ui/views/controls/button/label_button.h"
+#include "ui/views/controls/button/blue_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/link.h"
#include "ui/views/layout/grid_layout.h"
@@ -82,10 +82,10 @@ SigninView::SigninView(SigninDelegate* delegate, int width)
kHeadingPadding - title_descender);
layout->AddView(text);
- views::LabelButton* signin_button = new views::LabelButton(
+ views::BlueButton* signin_button = new views::BlueButton(
this,
delegate_->GetSigninButtonText());
- signin_button->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
+ signin_button->SetFont(*button_font_);
layout->StartRowWithPadding(0, kButtonSetId, 0,
kButtonPadding - text_descender);
layout->AddView(signin_button);
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 547b719954..7915d09107 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -14,6 +14,8 @@
'../../base/base.gyp:base',
'../../base/base.gyp:base_i18n',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../../cc/cc.gyp:cc',
+ '../../gpu/gpu.gyp:gpu',
'../../skia/skia.gyp:skia',
'../compositor/compositor.gyp:compositor',
'../ui.gyp:ui',
@@ -83,6 +85,8 @@
'root_window_host_delegate.h',
'root_window_host_mac.h',
'root_window_host_mac.mm',
+ 'root_window_host_ozone.cc',
+ 'root_window_host_ozone.h',
'root_window_host_win.cc',
'root_window_host_win.h',
'root_window_host_x11.cc',
@@ -153,6 +157,8 @@
'test/test_activation_client.h',
'test/test_aura_initializer.cc',
'test/test_aura_initializer.h',
+ 'test/test_cursor_client.cc',
+ 'test/test_cursor_client.h',
'test/test_event_handler.cc',
'test/test_event_handler.h',
'test/test_screen.cc',
@@ -163,6 +169,9 @@
'test/test_windows.h',
'test/test_window_delegate.cc',
'test/test_window_delegate.h',
+ 'test/ui_controls_factory_aura.h',
+ 'test/ui_controls_factory_aurawin.cc',
+ 'test/ui_controls_factory_aurax11.cc',
'test/window_test_api.cc',
'test/window_test_api.h',
],
@@ -281,6 +290,12 @@
'<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
],
}],
+ ['OS=="linux" and linux_use_tcmalloc==1', {
+ 'dependencies': [
+ # See http://crbug.com/162998#c4 for why this is needed.
+ '../../base/allocator/allocator.gyp:allocator',
+ ],
+ }],
],
},
],
diff --git a/ui/aura/bench/DEPS b/ui/aura/bench/DEPS
index e908ebb448..69deb97680 100644
--- a/ui/aura/bench/DEPS
+++ b/ui/aura/bench/DEPS
@@ -1,4 +1,4 @@
include_rules = [
"+third_party/khronos",
- "+third_party/WebKit/Source/Platform/chromium/public",
+ "+third_party/WebKit/public/platform",
]
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index e397929baa..08d31778b9 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -25,14 +25,13 @@
#include "ui/compositor/compositor_observer.h"
#include "ui/compositor/debug_utils.h"
#include "ui/compositor/layer.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/skia_util.h"
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES 1
#endif
-#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
+#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#if defined(USE_X11)
@@ -302,7 +301,6 @@ int main(int argc, char** argv) {
ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
- ui::CompositorTestSupport::Initialize();
aura::Env::GetInstance();
scoped_ptr<aura::TestScreen> test_screen(
aura::TestScreen::CreateFullscreen());
@@ -361,7 +359,5 @@ int main(int argc, char** argv) {
focus_client.reset();
root_window.reset();
- ui::CompositorTestSupport::Terminate();
-
return 0;
}
diff --git a/ui/aura/client/cursor_client.h b/ui/aura/client/cursor_client.h
index f5929ed6dd..85be344157 100644
--- a/ui/aura/client/cursor_client.h
+++ b/ui/aura/client/cursor_client.h
@@ -62,7 +62,7 @@ class AURA_EXPORT CursorClient {
// Used to pass the cursor resource module name to the cursor loader. This is
// typically used to load non system cursors.
- virtual void SetCursorResourceModule(const string16& module_name) = 0;
+ virtual void SetCursorResourceModule(const base::string16& module_name) = 0;
// Used to add or remove a CursorClientObserver.
virtual void AddObserver(CursorClientObserver* observer) = 0;
diff --git a/ui/aura/client/tooltip_client.cc b/ui/aura/client/tooltip_client.cc
index 79883251fa..a966c28392 100644
--- a/ui/aura/client/tooltip_client.cc
+++ b/ui/aura/client/tooltip_client.cc
@@ -8,14 +8,14 @@
#include "ui/aura/window_property.h"
DECLARE_WINDOW_PROPERTY_TYPE(aura::client::TooltipClient*)
-DECLARE_WINDOW_PROPERTY_TYPE(string16*)
+DECLARE_WINDOW_PROPERTY_TYPE(base::string16*)
namespace aura {
namespace client {
DEFINE_LOCAL_WINDOW_PROPERTY_KEY(
TooltipClient*, kRootWindowTooltipClientKey, NULL);
-DEFINE_LOCAL_WINDOW_PROPERTY_KEY(string16*, kTooltipTextKey, NULL);
+DEFINE_LOCAL_WINDOW_PROPERTY_KEY(base::string16*, kTooltipTextKey, NULL);
void SetTooltipClient(RootWindow* root_window, TooltipClient* client) {
root_window->SetProperty(kRootWindowTooltipClientKey, client);
@@ -26,13 +26,13 @@ TooltipClient* GetTooltipClient(RootWindow* root_window) {
root_window->GetProperty(kRootWindowTooltipClientKey) : NULL;
}
-void SetTooltipText(Window* window, string16* tooltip_text) {
+void SetTooltipText(Window* window, base::string16* tooltip_text) {
window->SetProperty(kTooltipTextKey, tooltip_text);
}
-const string16 GetTooltipText(Window* window) {
- string16* string_ptr = window->GetProperty(kTooltipTextKey);
- return string_ptr ? *string_ptr : string16();
+const base::string16 GetTooltipText(Window* window) {
+ base::string16* string_ptr = window->GetProperty(kTooltipTextKey);
+ return string_ptr ? *string_ptr : base::string16();
}
} // namespace client
diff --git a/ui/aura/client/tooltip_client.h b/ui/aura/client/tooltip_client.h
index 43966f68a3..d6d33ceb2f 100644
--- a/ui/aura/client/tooltip_client.h
+++ b/ui/aura/client/tooltip_client.h
@@ -11,6 +11,7 @@
namespace aura {
class RootWindow;
class Window;
+
namespace client {
class AURA_EXPORT TooltipClient {
@@ -29,8 +30,9 @@ class AURA_EXPORT TooltipClient {
AURA_EXPORT void SetTooltipClient(RootWindow* root_window,
TooltipClient* client);
AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window);
-AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text);
-AURA_EXPORT const string16 GetTooltipText(Window* window);
+
+AURA_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text);
+AURA_EXPORT const base::string16 GetTooltipText(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index 41717d268d..f6d5f27ff1 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -19,7 +19,6 @@
#include "ui/base/hit_test.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/rect.h"
@@ -110,7 +109,6 @@ class DemoStackingClient : public aura::client::StackingClient {
int DemoMain() {
// Create the message-loop here before creating the root window.
base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
- ui::CompositorTestSupport::Initialize();
aura::Env::GetInstance();
scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create());
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
@@ -147,8 +145,6 @@ int DemoMain() {
root_window->ShowRootWindow();
base::MessageLoopForUI::current()->Run();
- ui::CompositorTestSupport::Terminate();
-
return 0;
}
diff --git a/ui/aura/dispatcher_win.cc b/ui/aura/dispatcher_win.cc
index 7b2777d48f..2b4ca8a3dd 100644
--- a/ui/aura/dispatcher_win.cc
+++ b/ui/aura/dispatcher_win.cc
@@ -26,7 +26,7 @@ bool DispatcherWin::Dispatch(const base::NativeEvent& msg) {
return true;
}
-MessageLoop::Dispatcher* CreateDispatcher() {
+base::MessageLoop::Dispatcher* CreateDispatcher() {
return new DispatcherWin;
}
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index 33a6b01866..7350796f6f 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -64,7 +64,7 @@ void Env::RemoveObserver(EnvObserver* observer) {
}
#if !defined(OS_MACOSX)
-MessageLoop::Dispatcher* Env::GetDispatcher() {
+base::MessageLoop::Dispatcher* Env::GetDispatcher() {
#if defined(USE_X11)
return base::MessagePumpAuraX11::Current();
#else
@@ -82,7 +82,7 @@ void Env::RootWindowActivated(RootWindow* root_window) {
// Env, private:
void Env::Init() {
-#if !defined(USE_X11) && !defined(USE_MESSAGEPUMP_LINUX)
+#if !defined(USE_X11) && !defined(USE_OZONE)
dispatcher_.reset(CreateDispatcher());
#endif
#if defined(USE_X11)
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 99b05773e4..4ad55b6bc2 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -24,7 +24,7 @@ class Window;
#if !defined(USE_X11)
// Creates a platform-specific native event dispatcher.
-MessageLoop::Dispatcher* CreateDispatcher();
+base::MessageLoop::Dispatcher* CreateDispatcher();
#endif
// A singleton object that tracks general state within Aura.
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc
index d6b72dff54..a1ccdfd881 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -53,11 +53,10 @@ void SetVirtualKeyStates(uint32 flags) {
} // namespace
-void HandleOpenFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenFileCompletion& callback) {
+void HandleOpenFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
default_path,
@@ -65,11 +64,10 @@ void HandleOpenFile(
callback);
}
-void HandleOpenMultipleFiles(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenMultipleFilesCompletion& callback) {
+void HandleOpenMultipleFiles(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenMultipleFilesCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
title,
@@ -78,13 +76,12 @@ void HandleOpenMultipleFiles(
callback);
}
-void HandleSaveFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- int filter_index,
- const string16& default_extension,
- const SaveFileCompletion& callback) {
+void HandleSaveFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ int filter_index,
+ const base::string16& default_extension,
+ const SaveFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
default_path,
@@ -94,7 +91,7 @@ void HandleSaveFile(
callback);
}
-void HandleSelectFolder(const string16& title,
+void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
@@ -167,9 +164,9 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
}
void RemoteRootWindowHostWin::HandleOpenFile(
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
- const string16& filter,
+ const base::string16& filter,
const OpenFileCompletion& callback) {
if (!host_)
return;
@@ -185,10 +182,10 @@ void RemoteRootWindowHostWin::HandleOpenFile(
}
void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenMultipleFilesCompletion& callback) {
+ const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenMultipleFilesCompletion& callback) {
if (!host_)
return;
@@ -203,11 +200,11 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
}
void RemoteRootWindowHostWin::HandleSaveFile(
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
- const string16& filter,
+ const base::string16& filter,
int filter_index,
- const string16& default_extension,
+ const base::string16& default_extension,
const SaveFileCompletion& callback) {
if (!host_)
return;
@@ -226,7 +223,7 @@ void RemoteRootWindowHostWin::HandleSaveFile(
}
void RemoteRootWindowHostWin::HandleSelectFolder(
- const string16& title,
+ const base::string16& title,
const SelectFolderCompletion& callback) {
if (!host_)
return;
diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h
index 0577ee729b..c1e2da3c8c 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -43,34 +43,32 @@ typedef base::Callback<void(const base::FilePath&, int, void*)>
// Handles the open file operation for Metro Chrome Ash. The callback passed in
// is invoked when we receive the opened file name from the metro viewer.
-AURA_EXPORT void HandleOpenFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenFileCompletion& callback);
+AURA_EXPORT void HandleOpenFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenFileCompletion& callback);
// Handles the open multiple file operation for Metro Chrome Ash. The callback
// passed in is invoked when we receive the opened file names from the metro
// viewer.
AURA_EXPORT void HandleOpenMultipleFiles(
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
- const string16& filter,
+ const base::string16& filter,
const OpenMultipleFilesCompletion& callback);
// Handles the save file operation for Metro Chrome Ash. The callback passed in
// is invoked when we receive the saved file name from the metro viewer.
-AURA_EXPORT void HandleSaveFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- int filter_index,
- const string16& default_extension,
- const SaveFileCompletion& callback);
+AURA_EXPORT void HandleSaveFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ int filter_index,
+ const base::string16& default_extension,
+ const SaveFileCompletion& callback);
// Handles the select folder for Metro Chrome Ash. The callback passed in
// is invoked when we receive the folder name from the metro viewer.
-AURA_EXPORT void HandleSelectFolder(const string16& title,
+AURA_EXPORT void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback);
// RootWindowHost implementaton that receives events from a different
@@ -90,27 +88,24 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
// Called when we have a message from the remote process.
bool OnMessageReceived(const IPC::Message& message);
- void HandleOpenFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenFileCompletion& callback);
-
- void HandleOpenMultipleFiles(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- const OpenMultipleFilesCompletion& callback);
-
- void HandleSaveFile(
- const string16& title,
- const base::FilePath& default_path,
- const string16& filter,
- int filter_index,
- const string16& default_extension,
- const SaveFileCompletion& callback);
-
- void HandleSelectFolder(const string16& title,
+ void HandleOpenFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenFileCompletion& callback);
+
+ void HandleOpenMultipleFiles(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ const OpenMultipleFilesCompletion& callback);
+
+ void HandleSaveFile(const base::string16& title,
+ const base::FilePath& default_path,
+ const base::string16& filter,
+ int filter_index,
+ const base::string16& default_extension,
+ const SaveFileCompletion& callback);
+
+ void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback);
private:
diff --git a/ui/aura/root_window_host_ozone.cc b/ui/aura/root_window_host_ozone.cc
new file mode 100644
index 0000000000..2e046bc61e
--- /dev/null
+++ b/ui/aura/root_window_host_ozone.cc
@@ -0,0 +1,131 @@
+// Copyright 2013 The Chromium Authors. 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/aura/root_window_host_ozone.h"
+
+#include "ui/aura/root_window.h"
+
+namespace aura {
+
+RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds)
+ : delegate_(NULL), bounds_(bounds), factory_(new ui::EventFactoryOzone()) {
+ factory_->CreateEvdevWatchers();
+ base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this);
+}
+
+RootWindowHostOzone::~RootWindowHostOzone() {
+ base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
+}
+
+bool RootWindowHostOzone::Dispatch(const base::NativeEvent& ne) {
+ ui::Event* event = static_cast<ui::Event*>(ne);
+ if (event->IsTouchEvent()) {
+ ui::TouchEvent* touchev = static_cast<ui::TouchEvent*>(ne);
+ delegate_->OnHostTouchEvent(touchev);
+ } else if (event->IsKeyEvent()) {
+ ui::KeyEvent* keyev = static_cast<ui::KeyEvent*>(ne);
+ delegate_->OnHostKeyEvent(keyev);
+ }
+ return true;
+}
+
+void RootWindowHostOzone::SetDelegate(RootWindowHostDelegate* delegate) {
+ delegate_ = delegate;
+}
+
+RootWindow* RootWindowHostOzone::GetRootWindow() {
+ return delegate_->AsRootWindow();
+}
+
+gfx::AcceleratedWidget RootWindowHostOzone::GetAcceleratedWidget() {
+ // TODO(rjkroege): Support more than one screen. Screen ids start at 1 and
+ // increase for each screen.
+ return (gfx::AcceleratedWidget)1;
+}
+
+void RootWindowHostOzone::Show() { NOTIMPLEMENTED(); }
+
+void RootWindowHostOzone::Hide() { NOTIMPLEMENTED(); }
+
+void RootWindowHostOzone::ToggleFullScreen() { NOTIMPLEMENTED(); }
+
+gfx::Rect RootWindowHostOzone::GetBounds() const { return bounds_; }
+
+void RootWindowHostOzone::SetBounds(const gfx::Rect& bounds) {
+ NOTIMPLEMENTED();
+}
+
+gfx::Insets RootWindowHostOzone::GetInsets() const { return gfx::Insets(); }
+
+void RootWindowHostOzone::SetInsets(const gfx::Insets& insets) {
+ NOTIMPLEMENTED();
+}
+
+gfx::Point RootWindowHostOzone::GetLocationOnNativeScreen() const {
+ return bounds_.origin();
+}
+
+void RootWindowHostOzone::SetCapture() { NOTIMPLEMENTED(); }
+
+void RootWindowHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
+
+void RootWindowHostOzone::SetCursor(gfx::NativeCursor cursor) {
+ NOTIMPLEMENTED();
+}
+
+bool RootWindowHostOzone::QueryMouseLocation(gfx::Point* location_return) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool RootWindowHostOzone::ConfineCursorToRootWindow() {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void RootWindowHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
+
+void RootWindowHostOzone::OnCursorVisibilityChanged(bool show) {
+ NOTIMPLEMENTED();
+}
+
+void RootWindowHostOzone::MoveCursorTo(const gfx::Point& location) {
+ NOTIMPLEMENTED();
+}
+
+void RootWindowHostOzone::SetFocusWhenShown(bool focus_when_shown) {
+ NOTIMPLEMENTED();
+}
+
+bool RootWindowHostOzone::CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
+ const gfx::Point& dest_offset,
+ SkCanvas* canvas) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void RootWindowHostOzone::PostNativeEvent(
+ const base::NativeEvent& native_event) {
+ NOTIMPLEMENTED();
+}
+
+void RootWindowHostOzone::OnDeviceScaleFactorChanged(
+ float device_scale_factor) {
+ NOTIMPLEMENTED();
+}
+
+void RootWindowHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
+
+// static
+RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
+ return new RootWindowHostOzone(bounds);
+}
+
+// static
+gfx::Size RootWindowHost::GetNativeScreenSize() {
+ NOTIMPLEMENTED();
+ return gfx::Size();
+}
+
+} // namespace aura
diff --git a/ui/aura/root_window_host_ozone.h b/ui/aura/root_window_host_ozone.h
new file mode 100644
index 0000000000..107f2bf0a7
--- /dev/null
+++ b/ui/aura/root_window_host_ozone.h
@@ -0,0 +1,68 @@
+// Copyright 2013 The Chromium Authors. 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_AURA_ROOT_WINDOW_HOST_OZONE_H_
+#define UI_AURA_ROOT_WINDOW_HOST_OZONE_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
+#include "ui/aura/root_window_host.h"
+#include "ui/base/ozone/event_factory_ozone.h"
+#include "ui/gfx/rect.h"
+
+namespace aura {
+
+class RootWindowHostOzone : public RootWindowHost,
+ public base::MessageLoop::Dispatcher {
+ public:
+ explicit RootWindowHostOzone(const gfx::Rect& bounds);
+ virtual ~RootWindowHostOzone();
+
+ private:
+ // Overridden from Dispatcher overrides:
+ virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
+
+ // RootWindowHost Overrides.
+ virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE;
+ virtual RootWindow* GetRootWindow() OVERRIDE;
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void ToggleFullScreen() OVERRIDE;
+ virtual gfx::Rect GetBounds() const OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual gfx::Insets GetInsets() const OVERRIDE;
+ virtual void SetInsets(const gfx::Insets& bounds) OVERRIDE;
+ virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
+ virtual void SetCapture() OVERRIDE;
+ virtual void ReleaseCapture() OVERRIDE;
+ virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
+ virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
+ virtual bool ConfineCursorToRootWindow() OVERRIDE;
+ virtual void UnConfineCursor() OVERRIDE;
+ virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
+ virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
+ virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
+ virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
+ const gfx::Point& dest_offset,
+ SkCanvas* canvas) OVERRIDE;
+ virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual void PrepareForShutdown() OVERRIDE;
+
+ RootWindowHostDelegate* delegate_;
+ gfx::Rect bounds_;
+
+ // EventFactoryEvdev reads from /dev/input/* file descriptors and creates
+ // ui::Events from them.
+ scoped_ptr<ui::EventFactoryOzone> factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(RootWindowHostOzone);
+};
+
+} // namespace aura
+
+#endif // UI_AURA_ROOT_WINDOW_HOST_OZONE_H_
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index 5c5c6baa53..7d2c850212 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -18,6 +18,7 @@
#include <string>
#include "base/command_line.h"
+#include "base/debug/trace_event.h"
#include "base/message_loop.h"
#include "base/message_pump_aurax11.h"
#include "base/stl_util.h"
@@ -939,6 +940,11 @@ void RootWindowHostX11::DispatchXI2Event(const base::NativeEvent& event) {
if (!factory->ShouldProcessXI2Event(xev))
return;
+ TRACE_EVENT1("input", "RootWindowHostX11::DispatchXI2Event",
+ "event_latency_us",
+ (ui::EventTimeForNow() - ui::EventTimeFromNative(event)).
+ InMicroseconds());
+
ui::EventType type = ui::EventTypeFromNative(xev);
XEvent last_event;
int num_coalesced = 0;
diff --git a/ui/aura/test/event_generator.h b/ui/aura/test/event_generator.h
index 1256e1b819..a4ffca76c3 100644
--- a/ui/aura/test/event_generator.h
+++ b/ui/aura/test/event_generator.h
@@ -56,8 +56,32 @@ class EventGeneratorDelegate {
const aura::Window* window) const = 0;
};
-// EventGenerator is a tool that generates and dispatch events. The
-// coordinates of the points in API is determined by the
+// EventGenerator is a tool that generates and dispatch events.
+// Unlike |ui_controls| package in ui/base/test, this does not
+// generate platform native events. Insetad, it directly posts event
+// to |aura::RootWindow| synchronously.
+
+// Advantage of using this class, compared to |ui_controls| is that
+// you can write the tests that involves events in synchronus
+// way. There is no need to wait for native
+//
+// On the other hand, this class is not suited for the following
+// cases:
+//
+// 1) If your test depends on native events (ui::Event::native_event()).
+// This return is empty/NULL event with EventGenerator.
+// 2) If your test involves nested message loop, such as
+// menu or drag & drop. Because this class directly
+// post an event to RootWindow, this event will not be
+// handled in the nested message loop.
+// 3) Similarly, |base::MessagePumpObserver| will not be invoked.
+// 4) Any other code that requires native events, such as
+// tests for RootWindowHostWin/RootWindowHostX11.
+//
+// If one of these applies to your test, please use |ui_controls|
+// package instead.
+//
+// Note: The coordinates of the points in API is determined by the
// EventGeneratorDelegate.
class EventGenerator {
public:
diff --git a/ui/aura/test/test_cursor_client.cc b/ui/aura/test/test_cursor_client.cc
new file mode 100644
index 0000000000..9443166e93
--- /dev/null
+++ b/ui/aura/test/test_cursor_client.cc
@@ -0,0 +1,77 @@
+// Copyright 2013 The Chromium Authors. 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/aura/test/test_cursor_client.h"
+
+#include "ui/aura/client/cursor_client_observer.h"
+
+namespace aura {
+namespace test {
+
+TestCursorClient::TestCursorClient()
+ : visible_(true),
+ mouse_events_enabled_(true) {
+}
+
+TestCursorClient::~TestCursorClient() {
+}
+
+void TestCursorClient::SetCursor(gfx::NativeCursor cursor) {
+}
+
+void TestCursorClient::ShowCursor() {
+ visible_ = true;
+ FOR_EACH_OBSERVER(aura::client::CursorClientObserver, observers_,
+ OnCursorVisibilityChanged(true));
+}
+
+void TestCursorClient::HideCursor() {
+ visible_ = false;
+ FOR_EACH_OBSERVER(aura::client::CursorClientObserver, observers_,
+ OnCursorVisibilityChanged(false));
+}
+
+void TestCursorClient::SetScale(float scale) {
+}
+
+bool TestCursorClient::IsCursorVisible() const {
+ return visible_;
+}
+
+void TestCursorClient::EnableMouseEvents() {
+ mouse_events_enabled_ = true;
+}
+
+void TestCursorClient::DisableMouseEvents() {
+ mouse_events_enabled_ = false;
+}
+
+bool TestCursorClient::IsMouseEventsEnabled() const {
+ return mouse_events_enabled_;
+}
+
+void TestCursorClient::SetDisplay(const gfx::Display& display) {
+}
+
+void TestCursorClient::LockCursor() {
+}
+
+void TestCursorClient::UnlockCursor() {
+}
+
+void TestCursorClient::SetCursorResourceModule(const string16& module_name) {
+}
+
+void TestCursorClient::AddObserver(
+ aura::client::CursorClientObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void TestCursorClient::RemoveObserver(
+ aura::client::CursorClientObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+} // namespace test
+} // namespace aura
diff --git a/ui/aura/test/test_cursor_client.h b/ui/aura/test/test_cursor_client.h
new file mode 100644
index 0000000000..0af6edf097
--- /dev/null
+++ b/ui/aura/test/test_cursor_client.h
@@ -0,0 +1,49 @@
+// Copyright 2013 The Chromium Authors. 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_AURA_TEST_TEST_CURSOR_CLIENT_H_
+#define UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
+
+#include "base/compiler_specific.h"
+#include "base/observer_list.h"
+#include "ui/aura/client/cursor_client.h"
+
+namespace aura {
+namespace test {
+
+class TestCursorClient : public aura::client::CursorClient {
+ public:
+ TestCursorClient();
+ virtual ~TestCursorClient();
+
+ // Overridden from aura::client::CursorClient:
+ virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
+ virtual void ShowCursor() OVERRIDE;
+ virtual void HideCursor() OVERRIDE;
+ virtual void SetScale(float scale) OVERRIDE;
+ virtual bool IsCursorVisible() const OVERRIDE;
+ virtual void EnableMouseEvents() OVERRIDE;
+ virtual void DisableMouseEvents() OVERRIDE;
+ virtual bool IsMouseEventsEnabled() const OVERRIDE;
+ virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
+ virtual void LockCursor() OVERRIDE;
+ virtual void UnlockCursor() OVERRIDE;
+ virtual void SetCursorResourceModule(const string16& module_name) OVERRIDE;
+ virtual void AddObserver(
+ aura::client::CursorClientObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(
+ aura::client::CursorClientObserver* observer) OVERRIDE;
+
+ private:
+ bool visible_;
+ bool mouse_events_enabled_;
+ ObserverList<aura::client::CursorClientObserver> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestCursorClient);
+};
+
+} // namespace test
+} // namespace aura
+
+#endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
diff --git a/ui/aura/test/test_suite.cc b/ui/aura/test/test_suite.cc
index e487c9b602..5b76a17f73 100644
--- a/ui/aura/test/test_suite.cc
+++ b/ui/aura/test/test_suite.cc
@@ -10,7 +10,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor_setup.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gl/gl_implementation.h"
@@ -29,13 +28,11 @@ void AuraTestSuite::Initialize() {
// Force unittests to run using en-US so if we test against string
// output, it'll pass regardless of the system language.
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
- ui::CompositorTestSupport::Initialize();
ui::SetupTestCompositor();
}
void AuraTestSuite::Shutdown() {
- ui::CompositorTestSupport::Terminate();
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
diff --git a/ui/aura/test/ui_controls_factory_aura.h b/ui/aura/test/ui_controls_factory_aura.h
new file mode 100644
index 0000000000..800e927405
--- /dev/null
+++ b/ui/aura/test/ui_controls_factory_aura.h
@@ -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.
+
+#ifndef UI_AURA_TEST_UI_CONTROLS_FACTORY_AURA_H_
+#define UI_AURA_TEST_UI_CONTROLS_FACTORY_AURA_H_
+
+#include "ui/base/test/ui_controls_aura.h"
+
+namespace aura {
+class RootWindow;
+
+namespace test {
+
+ui_controls::UIControlsAura* CreateUIControlsAura(RootWindow* root_window);
+
+} // namespace test
+} // namespace aura
+
+#endif // UI_AURA_TEST_UI_CONTROLS_FACTORY_AURA_H_
diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc
new file mode 100644
index 0000000000..34a009e25b
--- /dev/null
+++ b/ui/aura/test/ui_controls_factory_aurawin.cc
@@ -0,0 +1,91 @@
+// Copyright 2013 The Chromium Authors. 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/basictypes.h"
+#include "base/logging.h"
+#include "base/message_loop.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/test/ui_controls_factory_aura.h"
+#include "ui/base/test/ui_controls_aura.h"
+#include "ui/base/test/ui_controls_internal_win.h"
+
+namespace aura {
+namespace test {
+
+namespace {
+
+using ui_controls::DOWN;
+using ui_controls::LEFT;
+using ui_controls::MIDDLE;
+using ui_controls::MouseButton;
+using ui_controls::RIGHT;
+using ui_controls::UIControlsAura;
+using ui_controls::UP;
+using namespace ui_controls::internal;
+
+class UIControlsWin : public UIControlsAura {
+ public:
+ UIControlsWin() {}
+
+ // UIControlsAura overrides:
+ virtual bool SendKeyPress(gfx::NativeWindow native_window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ DCHECK(!command); // No command key on Aura
+ HWND window = native_window->GetRootWindow()->GetAcceleratedWidget();
+ return SendKeyPressImpl(
+ window, key, control, shift, alt, base::Closure());
+ }
+ virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow native_window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) {
+ DCHECK(!command); // No command key on Aura
+ HWND window = native_window->GetRootWindow()->GetAcceleratedWidget();
+ return SendKeyPressImpl(window, key, control, shift, alt, task);
+ }
+ virtual bool SendMouseMove(long x, long y) {
+ gfx::Point point(x, y);
+ return SendMouseMoveImpl(point.x(), point.y(), base::Closure());
+ }
+ virtual bool SendMouseMoveNotifyWhenDone(long x,
+ long y,
+ const base::Closure& task) {
+ gfx::Point point(x, y);
+ return SendMouseMoveImpl(point.x(), point.y(), task);
+ }
+ virtual bool SendMouseEvents(MouseButton type, int state) {
+ return SendMouseEventsImpl(type, state, base::Closure());
+ }
+ virtual bool SendMouseEventsNotifyWhenDone(MouseButton type,
+ int state,
+ const base::Closure& task) {
+ return SendMouseEventsImpl(type, state, task);
+ }
+ virtual bool SendMouseClick(MouseButton type) {
+ return SendMouseEvents(type, UP | DOWN);
+ }
+ virtual void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
+ // On windows, posting UI events is synchronous so just post the closure.
+ base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIControlsWin);
+};
+
+} // namespace
+
+UIControlsAura* CreateUIControlsAura(aura::RootWindow* root_window) {
+ return new UIControlsWin();
+}
+
+} // namespace test
+} // namespace aura
diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc
new file mode 100644
index 0000000000..b7770432f9
--- /dev/null
+++ b/ui/aura/test/ui_controls_factory_aurax11.cc
@@ -0,0 +1,258 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <X11/keysym.h>
+#include <X11/Xlib.h>
+
+// X macro fail.
+#if defined(RootWindow)
+#undef RootWindow
+#endif
+
+#include "base/logging.h"
+#include "base/message_pump_aurax11.h"
+#include "ui/aura/client/screen_position_client.h"
+#include "ui/aura/env.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/test/ui_controls_factory_aura.h"
+#include "ui/base/keycodes/keyboard_code_conversion_x.h"
+#include "ui/base/test/ui_controls_aura.h"
+#include "ui/compositor/dip_util.h"
+
+namespace aura {
+namespace test {
+namespace {
+
+using ui_controls::DOWN;
+using ui_controls::LEFT;
+using ui_controls::MIDDLE;
+using ui_controls::MouseButton;
+using ui_controls::RIGHT;
+using ui_controls::UIControlsAura;
+using ui_controls::UP;
+
+// Mask of the buttons currently down.
+unsigned button_down_mask = 0;
+
+// Event waiter executes the specified closure|when a matching event
+// is found.
+// TODO(oshima): Move this to base.
+class EventWaiter : public base::MessageLoopForUI::Observer {
+ public:
+ typedef bool (*EventWaiterMatcher)(const base::NativeEvent& event);
+
+ EventWaiter(const base::Closure& closure, EventWaiterMatcher matcher)
+ : closure_(closure),
+ matcher_(matcher) {
+ base::MessageLoopForUI::current()->AddObserver(this);
+ }
+
+ virtual ~EventWaiter() {
+ base::MessageLoopForUI::current()->RemoveObserver(this);
+ }
+
+ // MessageLoop::Observer implementation:
+ virtual base::EventStatus WillProcessEvent(
+ const base::NativeEvent& event) OVERRIDE {
+ if ((*matcher_)(event)) {
+ base::MessageLoop::current()->PostTask(FROM_HERE, closure_);
+ delete this;
+ }
+ return base::EVENT_CONTINUE;
+ }
+
+ virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE {
+ }
+
+ private:
+ base::Closure closure_;
+ EventWaiterMatcher matcher_;
+ DISALLOW_COPY_AND_ASSIGN(EventWaiter);
+};
+
+// Returns atom that indidates that the XEvent is marker event.
+Atom MarkerEventAtom() {
+ return XInternAtom(base::MessagePumpAuraX11::GetDefaultXDisplay(),
+ "marker_event",
+ False);
+}
+
+// Returns true when the event is a marker event.
+bool Matcher(const base::NativeEvent& event) {
+ return event->xany.type == ClientMessage &&
+ event->xclient.message_type == MarkerEventAtom();
+}
+
+class UIControlsX11 : public UIControlsAura {
+ public:
+ UIControlsX11(aura::RootWindow* root_window) : root_window_(root_window) {
+ }
+
+ virtual bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) OVERRIDE {
+ DCHECK(!command); // No command key on Aura
+ return SendKeyPressNotifyWhenDone(
+ window, key, control, shift, alt, command, base::Closure());
+ }
+ virtual bool SendKeyPressNotifyWhenDone(
+ gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& closure) OVERRIDE {
+ DCHECK(!command); // No command key on Aura
+ XEvent xevent = {0};
+ xevent.xkey.type = KeyPress;
+ if (control)
+ SetKeycodeAndSendThenMask(&xevent, XK_Control_L, ControlMask);
+ if (shift)
+ SetKeycodeAndSendThenMask(&xevent, XK_Shift_L, ShiftMask);
+ if (alt)
+ SetKeycodeAndSendThenMask(&xevent, XK_Alt_L, Mod1Mask);
+ xevent.xkey.keycode =
+ XKeysymToKeycode(base::MessagePumpAuraX11::GetDefaultXDisplay(),
+ ui::XKeysymForWindowsKeyCode(key, shift));
+ root_window_->PostNativeEvent(&xevent);
+
+ // Send key release events.
+ xevent.xkey.type = KeyRelease;
+ root_window_->PostNativeEvent(&xevent);
+ if (alt)
+ UnmaskAndSetKeycodeThenSend(&xevent, Mod1Mask, XK_Alt_L);
+ if (shift)
+ UnmaskAndSetKeycodeThenSend(&xevent, ShiftMask, XK_Shift_L);
+ if (control)
+ UnmaskAndSetKeycodeThenSend(&xevent, ControlMask, XK_Control_L);
+ DCHECK(!xevent.xkey.state);
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+
+ // Simulate a mouse move. (x,y) are absolute screen coordinates.
+ virtual bool SendMouseMove(long x, long y) OVERRIDE {
+ return SendMouseMoveNotifyWhenDone(x, y, base::Closure());
+ }
+ virtual bool SendMouseMoveNotifyWhenDone(
+ long x,
+ long y,
+ const base::Closure& closure) OVERRIDE {
+ XEvent xevent = {0};
+ XMotionEvent* xmotion = &xevent.xmotion;
+ xmotion->type = MotionNotify;
+ gfx::Point point = ui::ConvertPointToPixel(
+ root_window_->layer(),
+ gfx::Point(static_cast<int>(x), static_cast<int>(y)));
+ xmotion->x = point.x();
+ xmotion->y = point.y();
+ xmotion->state = button_down_mask;
+ xmotion->same_screen = True;
+ // RootWindow will take care of other necessary fields.
+ root_window_->PostNativeEvent(&xevent);
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+ virtual bool SendMouseEvents(MouseButton type, int state) OVERRIDE {
+ return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
+ }
+ virtual bool SendMouseEventsNotifyWhenDone(
+ MouseButton type,
+ int state,
+ const base::Closure& closure) OVERRIDE {
+ XEvent xevent = {0};
+ XButtonEvent* xbutton = &xevent.xbutton;
+ gfx::Point mouse_loc = aura::Env::GetInstance()->last_mouse_location();
+ aura::client::ScreenPositionClient* screen_position_client =
+ aura::client::GetScreenPositionClient(root_window_);
+ if (screen_position_client)
+ screen_position_client->ConvertPointFromScreen(root_window_, &mouse_loc);
+ xbutton->x = mouse_loc.x();
+ xbutton->y = mouse_loc.y();
+ xbutton->same_screen = True;
+ switch (type) {
+ case LEFT:
+ xbutton->button = Button1;
+ xbutton->state = Button1Mask;
+ break;
+ case MIDDLE:
+ xbutton->button = Button2;
+ xbutton->state = Button2Mask;
+ break;
+ case RIGHT:
+ xbutton->button = Button3;
+ xbutton->state = Button3Mask;
+ break;
+ }
+ // RootWindow will take care of other necessary fields.
+ if (state & DOWN) {
+ xevent.xbutton.type = ButtonPress;
+ root_window_->PostNativeEvent(&xevent);
+ button_down_mask |= xbutton->state;
+ }
+ if (state & UP) {
+ xevent.xbutton.type = ButtonRelease;
+ root_window_->PostNativeEvent(&xevent);
+ button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state;
+ }
+ RunClosureAfterAllPendingUIEvents(closure);
+ return true;
+ }
+ virtual bool SendMouseClick(MouseButton type) OVERRIDE {
+ return SendMouseEvents(type, UP | DOWN);
+ }
+ virtual void RunClosureAfterAllPendingUIEvents(
+ const base::Closure& closure) OVERRIDE {
+ if (closure.is_null())
+ return;
+ static XEvent* marker_event = NULL;
+ if (!marker_event) {
+ marker_event = new XEvent();
+ marker_event->xclient.type = ClientMessage;
+ marker_event->xclient.display = NULL;
+ marker_event->xclient.window = None;
+ marker_event->xclient.format = 8;
+ }
+ marker_event->xclient.message_type = MarkerEventAtom();
+ root_window_->PostNativeEvent(marker_event);
+ new EventWaiter(closure, &Matcher);
+ }
+ private:
+ void SetKeycodeAndSendThenMask(XEvent* xevent,
+ KeySym keysym,
+ unsigned int mask) {
+ xevent->xkey.keycode =
+ XKeysymToKeycode(base::MessagePumpAuraX11::GetDefaultXDisplay(),
+ keysym);
+ root_window_->PostNativeEvent(xevent);
+ xevent->xkey.state |= mask;
+ }
+
+ void UnmaskAndSetKeycodeThenSend(XEvent* xevent,
+ unsigned int mask,
+ KeySym keysym) {
+ xevent->xkey.state ^= mask;
+ xevent->xkey.keycode =
+ XKeysymToKeycode(base::MessagePumpAuraX11::GetDefaultXDisplay(),
+ keysym);
+ root_window_->PostNativeEvent(xevent);
+ }
+
+ aura::RootWindow* root_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIControlsX11);
+};
+
+} // namespace
+
+UIControlsAura* CreateUIControlsAura(aura::RootWindow* root_window) {
+ return new UIControlsX11(root_window);
+}
+
+} // namespace test
+} // namespace aura
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index c1f7487309..dac14057a2 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -34,6 +34,15 @@
namespace aura {
+namespace {
+
+void MailboxReleaseCallback(scoped_ptr<base::SharedMemory> shared_memory,
+ unsigned sync_point, bool lost_resource) {
+ // NOTE: shared_memory will get released when we go out of scope.
+}
+
+} // namespace
+
Window::Window(WindowDelegate* delegate)
: type_(client::WINDOW_TYPE_UNKNOWN),
owned_by_parent_(true),
@@ -145,6 +154,9 @@ ui::Layer* Window::RecreateLayer() {
return NULL;
old_layer->set_delegate(NULL);
+ float mailbox_scale_factor;
+ cc::TextureMailbox old_mailbox =
+ old_layer->GetTextureMailbox(&mailbox_scale_factor);
scoped_refptr<ui::Texture> old_texture = old_layer->external_texture();
if (delegate_ && old_texture)
old_layer->SetExternalTexture(delegate_->CopyTexture());
@@ -158,8 +170,26 @@ ui::Layer* Window::RecreateLayer() {
// Move the original texture to the new layer if the old layer has a
// texture and we could copy it into the old layer,
// crbug.com/175211.
- if (delegate_ && old_texture)
+ if (delegate_ && old_texture) {
layer_->SetExternalTexture(old_texture);
+ } else if (old_mailbox.IsSharedMemory()) {
+ base::SharedMemory* old_buffer = old_mailbox.shared_memory();
+ const size_t size = old_mailbox.shared_memory_size_in_bytes();
+
+ scoped_ptr<base::SharedMemory> new_buffer(new base::SharedMemory);
+ new_buffer->CreateAndMapAnonymous(size);
+
+ if (old_buffer->memory() && new_buffer->memory()) {
+ memcpy(new_buffer->memory(), old_buffer->memory(), size);
+ base::SharedMemory* new_buffer_raw_ptr = new_buffer.get();
+ cc::TextureMailbox::ReleaseCallback callback =
+ base::Bind(MailboxReleaseCallback, Passed(&new_buffer));
+ cc::TextureMailbox new_mailbox(new_buffer_raw_ptr,
+ old_mailbox.shared_memory_size(),
+ callback);
+ layer_->SetTextureMailbox(new_mailbox, mailbox_scale_factor);
+ }
+ }
UpdateLayerName(name_);
layer_->SetFillsBoundsOpaquely(!transparent_);
@@ -313,10 +343,6 @@ void Window::SchedulePaintInRect(const gfx::Rect& rect) {
}
}
-void Window::SetExternalTexture(ui::Texture* texture) {
- layer_->SetExternalTexture(texture);
-}
-
void Window::SetDefaultParentByRootWindow(RootWindow* root_window,
const gfx::Rect& bounds_in_screen) {
DCHECK(root_window);
@@ -340,6 +366,12 @@ void Window::StackChildAbove(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_ABOVE);
}
+void Window::StackChildAtBottom(Window* child) {
+ if (children_.size() <= 1 || child == children_.front())
+ return; // At the bottom already.
+ StackChildBelow(child, children_.front());
+}
+
void Window::StackChildBelow(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_BELOW);
}
diff --git a/ui/aura/window.h b/ui/aura/window.h
index e2c0d83bb9..cbc700dcd6 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -93,8 +93,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
const std::string& name() const { return name_; }
void SetName(const std::string& name);
- const string16 title() const { return title_; }
- void set_title(const string16& title) { title_ = title; }
+ const base::string16 title() const { return title_; }
+ void set_title(const base::string16& title) { title_ = title; }
bool transparent() const { return transparent_; }
void SetTransparent(bool transparent);
@@ -157,9 +157,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Marks the a portion of window as needing to be painted.
void SchedulePaintInRect(const gfx::Rect& rect);
- // Assigns a new external texture to the window's layer.
- void SetExternalTexture(ui::Texture* texture);
-
// Places this window per |root_window|'s stacking client. The final location
// may be a RootWindow other than the one passed in. |root_window| may not be
// NULL. |bounds_in_screen| may be empty; it is more optional context that
@@ -175,6 +172,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// see WindowTest.StackingMadrigal for details.
void StackChildAbove(Window* child, Window* target);
+ // Stacks the specified child of this window at the bottom of the z-order.
+ void StackChildAtBottom(Window* child);
+
// Stacks |child| below |target|. Does nothing if |child| is already below
// |target|.
void StackChildBelow(Window* child, Window* target);
@@ -486,7 +486,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
int id_;
std::string name_;
- string16 title_;
+ base::string16 title_;
// Whether layer is initialized as non-opaque.
bool transparent_;
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 57f9cd5e9c..c7b8f78a70 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -13,7 +13,7 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ui/base/clipboard/clipboard.cc b/ui/base/clipboard/clipboard.cc
index 684d8d5293..d8d0788e09 100644
--- a/ui/base/clipboard/clipboard.cc
+++ b/ui/base/clipboard/clipboard.cc
@@ -92,36 +92,9 @@ static base::LazyInstance<ClipboardMap> g_clipboard_map =
static base::LazyInstance<base::Lock>::Leaky
g_clipboard_map_lock = LAZY_INSTANCE_INITIALIZER;
-const std::size_t kSourceTagSize = sizeof(SourceTag);
-
-// The union serves to easily convert SourceTag into its binary representation
-// and vice versa.
-union SourceTag2BinaryHelper {
- SourceTag tag;
- uint8 bytes[kSourceTagSize];
-};
-
} // namespace
// static
-Clipboard::ObjectMapParam Clipboard::SourceTag2Binary(SourceTag tag) {
- SourceTag2BinaryHelper helper;
- helper.tag = tag;
- std::vector<char> bytes(kSourceTagSize);
- memcpy(&bytes[0], helper.bytes, kSourceTagSize);
- return bytes;
-}
-
-// static
-SourceTag Clipboard::Binary2SourceTag(const std::string& binary) {
- if (binary.size() != kSourceTagSize)
- return SourceTag();
- SourceTag2BinaryHelper helper;
- memcpy(helper.bytes, binary.c_str(), kSourceTagSize);
- return helper.tag;
-}
-
-// static
void Clipboard::SetAllowedThreads(
const std::vector<base::PlatformThreadId>& allowed_threads) {
base::AutoLock lock(g_clipboard_map_lock.Get());
@@ -173,14 +146,6 @@ void Clipboard::DestroyClipboardForCurrentThread() {
}
}
-void Clipboard::WriteObjects(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
- WriteObjectsImpl(buffer, objects, tag);
- if (!write_objects_callback_.is_null())
- write_objects_callback_.Run(buffer);
-}
-
void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) {
// All types apart from CBF_WEBKIT need at least 1 non-empty param.
if (type != CBF_WEBKIT && (params.empty() || params[0].empty()))
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 990728e4e0..fffde68234 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -9,7 +9,6 @@
#include <string>
#include <vector>
-#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/shared_memory.h"
@@ -17,7 +16,6 @@
#include "base/string16.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_checker.h"
-#include "ui/base/clipboard/clipboard_sourcetag.h"
#include "ui/base/ui_export.h"
#if defined(TOOLKIT_GTK)
@@ -52,10 +50,8 @@ typedef struct _GtkClipboard GtkClipboard;
#endif
#ifdef __OBJC__
-@class NSPasteboard;
@class NSString;
#else
-class NSPasteboard;
class NSString;
#endif
@@ -187,9 +183,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
typedef std::vector<ObjectMapParam> ObjectMapParams;
typedef std::map<int /* ObjectType */, ObjectMapParams> ObjectMap;
- static ObjectMapParam SourceTag2Binary(SourceTag tag);
- static SourceTag Binary2SourceTag(const std::string& serialization);
-
// Buffer designates which clipboard the action should be applied to.
// Only platforms that use the X Window System support the selection
// buffer.
@@ -198,13 +191,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
BUFFER_SELECTION,
};
- // The callback is called after Clipboard::WriteObjects().
- // Don't use it for notification about changed OS clipboard.
- void set_write_objects_callback_for_testing(
- const base::Callback<void(Buffer)>& cb) {
- write_objects_callback_ = cb;
- }
-
static bool IsValidBuffer(int32 buffer) {
switch (buffer) {
case BUFFER_STANDARD:
@@ -242,9 +228,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// contents of |objects|. On Windows they are copied to the system clipboard.
// On linux they are copied into a structure owned by the Clipboard object and
// kept until the system clipboard is set again.
- // SourceTag is optional value to be stored in the clipboard, NULL won't be
- // stored.
- void WriteObjects(Buffer buffer, const ObjectMap& objects, SourceTag tag);
+ void WriteObjects(Buffer buffer, const ObjectMap& objects);
// Returns a sequence number which uniquely identifies clipboard state.
// This can be used to version the data on the clipboard and determine
@@ -291,9 +275,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// as a byte vector.
void ReadData(const FormatType& format, std::string* result) const;
- // Reads Source tag from the clipboard, if available.
- SourceTag ReadSourceTag(Buffer buffer) const;
-
// Gets the FormatType corresponding to an arbitrary format string,
// registering it with the system if needed. Due to Windows/Linux
// limitiations, |format_string| must never be controlled by the user.
@@ -316,7 +297,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// crbug.com/158399.
static const FormatType& GetWebCustomDataFormatType();
static const FormatType& GetPepperCustomDataFormatType();
- static const FormatType& GetSourceTagFormatType();
// Embeds a pointer to a SharedMemory object pointed to by |bitmap_handle|
// belonging to |process| into a shared bitmap [CBF_SMBITMAP] slot in
@@ -334,12 +314,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
static const FormatType& GetFileContentZeroFormatType();
#endif
-#if defined(OS_MACOSX)
- // Allows code that directly manipulates the clipboard and doesn't use this
- // class to write a SourceTag.
- static void WriteSourceTag(NSPasteboard* pb, SourceTag tag);
-#endif
-
private:
FRIEND_TEST_ALL_PREFIXES(ClipboardTest, SharedBitmapTest);
FRIEND_TEST_ALL_PREFIXES(ClipboardTest, EmptyHTMLTest);
@@ -350,8 +324,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
void DispatchObject(ObjectType type, const ObjectMapParams& params);
- void WriteObjectsImpl(Buffer buffer, const ObjectMap& objects, SourceTag tag);
-
void WriteText(const char* text_data, size_t text_len);
void WriteHTML(const char* markup_data,
@@ -373,8 +345,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
void WriteData(const FormatType& format,
const char* data_data,
size_t data_len);
-
- void WriteSourceTag(SourceTag tag);
#if defined(OS_WIN)
void WriteBitmapFromHandle(HBITMAP source_hbitmap,
const gfx::Size& size);
@@ -418,26 +388,17 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// Find the gtk clipboard for the passed buffer enum.
GtkClipboard* LookupBackingClipboard(Buffer clipboard) const;
- // Reads raw data from the specified clipboard with the given format type.
- void ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const;
TargetMap* clipboard_data_;
GtkClipboard* clipboard_;
GtkClipboard* primary_selection_;
#elif defined(USE_AURA) && defined(USE_X11) && !defined(OS_CHROMEOS)
private:
- // Reads raw data from the specified clipboard with the given format type.
- void ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const;
// We keep our implementation details private because otherwise we bring in
// the X11 headers and break chrome compile.
class AuraX11Details;
scoped_ptr<AuraX11Details> aurax11_details_;
#endif
- base::Callback<void(Buffer)> write_objects_callback_;
DISALLOW_COPY_AND_ASSIGN(Clipboard);
};
diff --git a/ui/base/clipboard/clipboard_android.cc b/ui/base/clipboard/clipboard_android.cc
index 337c1eaca3..0204c1b619 100644
--- a/ui/base/clipboard/clipboard_android.cc
+++ b/ui/base/clipboard/clipboard_android.cc
@@ -7,8 +7,8 @@
#include "base/android/jni_string.h"
#include "base/lazy_instance.h"
#include "base/stl_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h"
-#include "base/utf_string_conversions.h"
#include "jni/Clipboard_jni.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard_android_initialization.h"
@@ -43,7 +43,6 @@ const char kWebKitSmartPasteFormat[] = "webkit_smart";
const char kBookmarkFormat[] = "bookmark";
const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data";
const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data";
-const char kSourceTagFormat[] = "source_tag";
class ClipboardMap {
public:
@@ -184,9 +183,7 @@ Clipboard::~Clipboard() {
}
// Main entry point used to write several values in the clipboard.
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(buffer, BUFFER_STANDARD);
g_map.Get().Clear();
@@ -194,7 +191,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
}
uint64 Clipboard::GetSequenceNumber(Clipboard::Buffer /* buffer */) {
@@ -312,14 +308,6 @@ void Clipboard::ReadData(const Clipboard::FormatType& format,
*result = g_map.Get().Get(format.data());
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- DCHECK(CalledOnValidThread());
- DCHECK_EQ(buffer, BUFFER_STANDARD);
- std::string result;
- ReadData(GetSourceTagFormatType(), &result);
- return Binary2SourceTag(result);
-}
-
// static
Clipboard::FormatType Clipboard::GetFormatType(
const std::string& format_string) {
@@ -374,12 +362,6 @@ const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
return type;
}
-// static
-const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
- CR_DEFINE_STATIC_LOCAL(FormatType, type, (kSourceTagFormat));
- return type;
-}
-
void Clipboard::WriteText(const char* text_data, size_t text_len) {
g_map.Get().Set(kPlainTextFormat, std::string(text_data, text_len));
}
@@ -426,13 +408,6 @@ void Clipboard::WriteData(const Clipboard::FormatType& format,
g_map.Get().Set(format.data(), std::string(data_data, data_len));
}
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag()) {
- ObjectMapParam binary = SourceTag2Binary(tag);
- WriteData(GetSourceTagFormatType(), &binary[0], binary.size());
- }
-}
-
// See clipboard_android_initialization.h for more information.
bool RegisterClipboardAndroid(JNIEnv* env) {
return RegisterNativesImpl(env);
diff --git a/ui/base/clipboard/clipboard_aura.cc b/ui/base/clipboard/clipboard_aura.cc
index d56e49410c..f616774997 100644
--- a/ui/base/clipboard/clipboard_aura.cc
+++ b/ui/base/clipboard/clipboard_aura.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/gfx/size.h"
@@ -34,7 +34,6 @@ enum AuraClipboardFormat {
BITMAP = 1 << 4,
CUSTOM = 1 << 5,
WEB = 1 << 6,
- SOURCETAG = 1 << 7,
};
// ClipboardData contains data copied to the Clipboard for a variety of formats.
@@ -43,7 +42,6 @@ class ClipboardData {
public:
ClipboardData()
: bitmap_data_(),
- source_tag_(),
web_smart_paste_(false),
format_(0) {}
@@ -120,12 +118,6 @@ class ClipboardData {
format_ |= WEB;
}
- SourceTag source_tag() const { return source_tag_; }
- void set_source_tag(SourceTag tag) {
- source_tag_ = tag;
- format_ |= SOURCETAG;
- }
-
private:
// Plain text in UTF8 format.
std::string text_;
@@ -152,9 +144,6 @@ class ClipboardData {
std::string custom_data_format_;
std::string custom_data_data_;
- // SourceTag.
- SourceTag source_tag_;
-
// WebKit smart paste data.
bool web_smart_paste_;
@@ -307,13 +296,6 @@ class AuraClipboard {
*result = data->custom_data_data();
}
- SourceTag ReadSourceTag() const {
- if (!HasFormat(SOURCETAG))
- return SourceTag();
- const ClipboardData* data = GetData();
- return data->source_tag();
- }
-
// Writes |data| to the top of the clipboard stack.
void WriteData(ClipboardData* data) {
DCHECK(data);
@@ -417,11 +399,6 @@ class ClipboardDataBuilder {
data->SetCustomData(format, std::string(data_data, data_len));
}
- static void WriteSourceTag(SourceTag tag) {
- ClipboardData* data = GetCurrentData();
- data->set_source_tag(tag);
- }
-
private:
static ClipboardData* GetCurrentData() {
if (!current_data_)
@@ -475,16 +452,13 @@ Clipboard::~Clipboard() {
DeleteClipboard();
}
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK(CalledOnValidThread());
DCHECK(IsValidBuffer(buffer));
for (ObjectMap::const_iterator iter = objects.begin();
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
ClipboardDataBuilder::CommitToClipboard();
}
@@ -591,12 +565,6 @@ void Clipboard::ReadData(const FormatType& format, std::string* result) const {
GetClipboard()->ReadData(format.ToString(), result);
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- DCHECK(CalledOnValidThread());
- DCHECK_EQ(BUFFER_STANDARD, buffer);
- return GetClipboard()->ReadSourceTag();
-}
-
uint64 Clipboard::GetSequenceNumber(Buffer buffer) {
DCHECK(CalledOnValidThread());
return GetClipboard()->GetNumClipboardEntries();
@@ -638,11 +606,6 @@ void Clipboard::WriteData(const FormatType& format,
ClipboardDataBuilder::WriteData(format.ToString(), data_data, data_len);
}
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag())
- ClipboardDataBuilder::WriteSourceTag(tag);
-}
-
// static
Clipboard::FormatType Clipboard::GetFormatType(
const std::string& format_string) {
diff --git a/ui/base/clipboard/clipboard_aurax11.cc b/ui/base/clipboard/clipboard_aurax11.cc
index bfc474b823..2dfe9d666f 100644
--- a/ui/base/clipboard/clipboard_aurax11.cc
+++ b/ui/base/clipboard/clipboard_aurax11.cc
@@ -17,7 +17,7 @@
#include "base/message_pump_aurax11.h"
#include "base/message_pump_observer.h"
#include "base/stl_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/x/selection_owner.h"
@@ -37,7 +37,6 @@ const char kMimeTypeBitmap[] = "image/bmp";
const char kMimeTypeFilename[] = "chromium/filename";
const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data";
const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste";
-const char kSourceTagType[] = "org.chromium.source-tag";
const char kTargets[] = "TARGETS";
const char* kAtomsToCache[] = {
@@ -46,7 +45,6 @@ const char* kAtomsToCache[] = {
kMimeTypeFilename,
kMimeTypeMozillaURL,
kMimeTypeWebkitSmartPaste,
- kSourceTagType,
kString,
kTargets,
kText,
@@ -540,9 +538,7 @@ Clipboard::~Clipboard() {
// current selection to live on.
}
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK(CalledOnValidThread());
DCHECK(IsValidBuffer(buffer));
@@ -551,7 +547,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
aurax11_details_->TakeOwnershipOfSelection(buffer);
if (buffer == BUFFER_STANDARD) {
@@ -560,7 +555,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
aurax11_details_->CreateNewClipboardData();
const ObjectMapParam& char_vector = text_iter->second[0];
WriteText(&char_vector.front(), char_vector.size());
- WriteSourceTag(tag);
aurax11_details_->TakeOwnershipOfSelection(BUFFER_SELECTION);
}
}
@@ -696,26 +690,14 @@ void Clipboard::ReadBookmark(string16* title, std::string* url) const {
}
void Clipboard::ReadData(const FormatType& format, std::string* result) const {
- ReadDataImpl(BUFFER_STANDARD, format, result);
-}
-
-void Clipboard::ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const {
DCHECK(CalledOnValidThread());
scoped_ptr<SelectionData> data(aurax11_details_->RequestAndWaitForTypes(
- buffer, aurax11_details_->GetAtomsForFormat(format)));
+ BUFFER_STANDARD, aurax11_details_->GetAtomsForFormat(format)));
if (data.get())
data->AssignTo(result);
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- std::string result;
- ReadDataImpl(buffer, GetSourceTagFormatType(), &result);
- return Binary2SourceTag(result);
-}
-
uint64 Clipboard::GetSequenceNumber(Buffer buffer) {
DCHECK(CalledOnValidThread());
if (buffer == BUFFER_STANDARD)
@@ -797,13 +779,6 @@ void Clipboard::WriteData(const FormatType& format,
aurax11_details_->InsertMapping(format.ToString(), data, data_len);
}
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag()) {
- ObjectMapParam binary = SourceTag2Binary(tag);
- WriteData(GetSourceTagFormatType(), &binary[0], binary.size());
- }
-}
-
// static
Clipboard::FormatType Clipboard::GetFormatType(
const std::string& format_string) {
@@ -879,10 +854,4 @@ const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
return type;
}
-// static
-const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
- CR_DEFINE_STATIC_LOCAL(FormatType, type, (kSourceTagType));
- return type;
-}
-
} // namespace ui
diff --git a/ui/base/clipboard/clipboard_gtk.cc b/ui/base/clipboard/clipboard_gtk.cc
index 7d16c16cdf..722242ae30 100644
--- a/ui/base/clipboard/clipboard_gtk.cc
+++ b/ui/base/clipboard/clipboard_gtk.cc
@@ -16,7 +16,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -106,7 +106,6 @@ GdkFilterReturn SelectionChangeObserver::OnXEvent(GdkXEvent* xevent,
return GDK_FILTER_CONTINUE;
}
-const char kSourceTagType[] = "org.chromium.source-tag";
const char kMimeTypeBitmap[] = "image/bmp";
const char kMimeTypeMozillaURL[] = "text/x-moz-url";
const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data";
@@ -218,9 +217,7 @@ Clipboard::~Clipboard() {
gtk_clipboard_store(clipboard_);
}
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK(CalledOnValidThread());
clipboard_data_ = new TargetMap();
@@ -228,7 +225,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
SetGtkClipboard(buffer);
if (buffer == BUFFER_STANDARD) {
@@ -236,9 +232,7 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
if (text_iter != objects.end()) {
// Copy text and SourceTag to the selection clipboard.
ObjectMap::const_iterator next_iter = text_iter;
- WriteObjectsImpl(BUFFER_SELECTION,
- ObjectMap(text_iter, ++next_iter),
- tag);
+ WriteObjects(BUFFER_SELECTION, ObjectMap(text_iter, ++next_iter));
}
}
}
@@ -356,13 +350,6 @@ void Clipboard::WriteData(const FormatType& format,
InsertMapping(GdkAtomToString(format.ToGdkAtom()).c_str(), data, data_len);
}
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag()) {
- ObjectMapParam binary = SourceTag2Binary(tag);
- WriteData(GetSourceTagFormatType(), &binary[0], binary.size());
- }
-}
-
// We do not use gtk_clipboard_wait_is_target_available because of
// a bug with the gtk clipboard. It caches the available targets
// and does not always refresh the cache when it is appropriate.
@@ -589,17 +576,10 @@ void Clipboard::ReadBookmark(string16* title, std::string* url) const {
}
void Clipboard::ReadData(const FormatType& format, std::string* result) const {
- ReadDataImpl(BUFFER_STANDARD, format, result);
-}
-
-void Clipboard::ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const {
DCHECK(CalledOnValidThread());
result->clear();
- GtkClipboard* clipboard = LookupBackingClipboard(buffer);
GtkSelectionData* data =
- gtk_clipboard_wait_for_contents(clipboard, format.ToGdkAtom());
+ gtk_clipboard_wait_for_contents(clipboard_, format.ToGdkAtom());
if (!data)
return;
result->assign(reinterpret_cast<const char*>(
@@ -608,12 +588,6 @@ void Clipboard::ReadDataImpl(Buffer buffer,
gtk_selection_data_free(data);
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- std::string result;
- ReadDataImpl(buffer, GetSourceTagFormatType(), &result);
- return Binary2SourceTag(result);
-}
-
uint64 Clipboard::GetSequenceNumber(Buffer buffer) {
DCHECK(CalledOnValidThread());
if (buffer == BUFFER_STANDARD)
@@ -686,12 +660,6 @@ const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
return type;
}
-// static
-const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
- CR_DEFINE_STATIC_LOCAL(FormatType, type, (kSourceTagType));
- return type;
-}
-
void Clipboard::InsertMapping(const char* key,
char* data,
size_t data_len) {
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
index c8b0b86afe..759e5a08e4 100644
--- a/ui/base/clipboard/clipboard_mac.mm
+++ b/ui/base/clipboard/clipboard_mac.mm
@@ -14,7 +14,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/stl_util.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
@@ -26,9 +26,6 @@ namespace ui {
namespace {
-// Source tag format type.
-NSString* const kSourceTagPboardType = @"org.chromium.source-tag-data";
-
// Would be nice if this were in UTCoreTypes.h, but it isn't
NSString* const kUTTypeURLName = @"public.url-name";
@@ -49,15 +46,6 @@ NSPasteboard* GetPasteboard() {
return pasteboard;
}
-void WriteDataImpl(NSPasteboard* pb,
- NSString* format,
- const char* data_data,
- size_t data_len) {
- [pb addTypes:[NSArray arrayWithObject:format] owner:nil];
- [pb setData:[NSData dataWithBytes:data_data length:data_len]
- forType:format];
-}
-
} // namespace
Clipboard::FormatType::FormatType() : data_(nil) {
@@ -102,9 +90,7 @@ Clipboard::~Clipboard() {
DCHECK(CalledOnValidThread());
}
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(buffer, BUFFER_STANDARD);
@@ -115,7 +101,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
}
void Clipboard::WriteText(const char* text_data, size_t text_len) {
@@ -221,23 +206,10 @@ void Clipboard::WriteBitmap(const char* pixel_data, const char* size_data) {
void Clipboard::WriteData(const FormatType& format,
const char* data_data,
size_t data_len) {
- WriteDataImpl(GetPasteboard(), format.ToNSString(), data_data, data_len);
-}
-
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag())
- WriteSourceTag(GetPasteboard(), tag);
-}
-
-// static
-void Clipboard::WriteSourceTag(NSPasteboard* pb, SourceTag tag) {
- if (tag != SourceTag()) {
- ObjectMapParam binary = SourceTag2Binary(tag);
- WriteDataImpl(pb,
- GetSourceTagFormatType().ToNSString(),
- &binary[0],
- binary.size());
- }
+ NSPasteboard* pb = GetPasteboard();
+ [pb addTypes:[NSArray arrayWithObject:format.ToNSString()] owner:nil];
+ [pb setData:[NSData dataWithBytes:data_data length:data_len]
+ forType:format.ToNSString()];
}
// Write an extra flavor that signifies WebKit was the last to modify the
@@ -438,13 +410,6 @@ void Clipboard::ReadData(const FormatType& format, std::string* result) const {
result->assign(static_cast<const char*>([data bytes]), [data length]);
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- DCHECK_EQ(buffer, BUFFER_STANDARD);
- std::string result;
- ReadData(GetSourceTagFormatType(), &result);
- return Binary2SourceTag(result);
-}
-
// static
Clipboard::FormatType Clipboard::GetFormatType(
const std::string& format_string) {
@@ -520,10 +485,4 @@ const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
return type;
}
-// static
-const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
- CR_DEFINE_STATIC_LOCAL(FormatType, type, (kSourceTagPboardType));
- return type;
-}
-
} // namespace ui
diff --git a/ui/base/clipboard/clipboard_sourcetag.h b/ui/base/clipboard/clipboard_sourcetag.h
deleted file mode 100644
index ba4ab946ce..0000000000
--- a/ui/base/clipboard/clipboard_sourcetag.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Chromium Authors. 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_BASE_CLIPBOARD_CLIPBOARD_SOURCETAG_H_
-#define UI_BASE_CLIPBOARD_CLIPBOARD_SOURCETAG_H_
-
-namespace ui {
-
-// Clipboard::WriteObject() caller can use the SourceTag that will be stored in
-// the clipboard. NULL value means "no tag".
-typedef void* SourceTag;
-
-} // namespace ui
-
-#endif // UI_BASE_CLIPBOARD_CLIPBOARD_SOURCETAG_H_
diff --git a/ui/base/clipboard/clipboard_unittest.cc b/ui/base/clipboard/clipboard_unittest.cc
index 0215a971a6..7842196a8e 100644
--- a/ui/base/clipboard/clipboard_unittest.cc
+++ b/ui/base/clipboard/clipboard_unittest.cc
@@ -11,7 +11,7 @@
#include "base/message_loop.h"
#include "base/pickle.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -361,8 +361,7 @@ TEST_F(ClipboardTest, SharedBitmapTest) {
Clipboard::ReplaceSharedMemHandle(&objects, handle_to_share, current_process);
clipboard().WriteObjects(Clipboard::BUFFER_STANDARD,
- objects,
- SourceTag());
+ objects);
EXPECT_TRUE(clipboard().IsFormatAvailable(Clipboard::GetBitmapFormatType(),
Clipboard::BUFFER_STANDARD));
diff --git a/ui/base/clipboard/clipboard_util_win.cc b/ui/base/clipboard/clipboard_util_win.cc
index d50a0825e8..25270d746e 100644
--- a/ui/base/clipboard/clipboard_util_win.cc
+++ b/ui/base/clipboard/clipboard_util_win.cc
@@ -11,9 +11,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_handle.h"
-#include "base/stringprintf.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/custom_data_helper.h"
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 2935ea2173..271bd37def 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -20,7 +20,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/strings/utf_offset_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_gdi_object.h"
#include "base/win/scoped_hdc.h"
#include "base/win/wrapped_window_proc.h"
@@ -225,9 +225,7 @@ Clipboard::~Clipboard() {
clipboard_owner_ = NULL;
}
-void Clipboard::WriteObjectsImpl(Buffer buffer,
- const ObjectMap& objects,
- SourceTag tag) {
+void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
DCHECK_EQ(buffer, BUFFER_STANDARD);
ScopedClipboard clipboard;
@@ -240,7 +238,6 @@ void Clipboard::WriteObjectsImpl(Buffer buffer,
iter != objects.end(); ++iter) {
DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
}
- WriteSourceTag(tag);
}
void Clipboard::WriteText(const char* text_data, size_t text_len) {
@@ -380,13 +377,6 @@ void Clipboard::WriteData(const FormatType& format,
WriteToClipboard(format.ToUINT(), hdata);
}
-void Clipboard::WriteSourceTag(SourceTag tag) {
- if (tag != SourceTag()) {
- ObjectMapParam binary = SourceTag2Binary(tag);
- WriteData(GetSourceTagFormatType(), &binary[0], binary.size());
- }
-}
-
void Clipboard::WriteToClipboard(unsigned int format, HANDLE handle) {
DCHECK(clipboard_owner_);
if (handle && !::SetClipboardData(format, handle)) {
@@ -677,13 +667,6 @@ void Clipboard::ReadData(const FormatType& format, std::string* result) const {
::GlobalUnlock(data);
}
-SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
- DCHECK_EQ(buffer, BUFFER_STANDARD);
- std::string result;
- ReadData(GetSourceTagFormatType(), &result);
- return Binary2SourceTag(result);
-}
-
// static
void Clipboard::ParseBookmarkClipboardFormat(const string16& bookmark,
string16* title,
@@ -834,15 +817,6 @@ const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
}
// static
-const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
- CR_DEFINE_STATIC_LOCAL(
- FormatType,
- type,
- (::RegisterClipboardFormat(L"Chromium Source tag Format")));
- return type;
-}
-
-// static
void Clipboard::FreeData(unsigned int format, HANDLE data) {
if (format == CF_BITMAP)
::DeleteObject(static_cast<HBITMAP>(data));
diff --git a/ui/base/clipboard/custom_data_helper_unittest.cc b/ui/base/clipboard/custom_data_helper_unittest.cc
index bf9263ec1d..3183b2bd25 100644
--- a/ui/base/clipboard/custom_data_helper_unittest.cc
+++ b/ui/base/clipboard/custom_data_helper_unittest.cc
@@ -7,7 +7,7 @@
#include <utility>
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace ui {
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index 1c215bb762..330862bad6 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -9,7 +9,7 @@
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/size.h"
namespace ui {
@@ -17,21 +17,12 @@ namespace ui {
ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard,
Clipboard::Buffer buffer)
: clipboard_(clipboard),
- buffer_(buffer),
- source_tag_() {
-}
-
-ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard,
- Clipboard::Buffer buffer,
- SourceTag source_tag)
- : clipboard_(clipboard),
- buffer_(buffer),
- source_tag_(source_tag) {
+ buffer_(buffer) {
}
ScopedClipboardWriter::~ScopedClipboardWriter() {
if (!objects_.empty() && clipboard_)
- clipboard_->WriteObjects(buffer_, objects_, source_tag_);
+ clipboard_->WriteObjects(buffer_, objects_);
}
void ScopedClipboardWriter::WriteText(const string16& text) {
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index 32f9a879f0..576922bdf2 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -30,10 +30,6 @@ class UI_EXPORT ScopedClipboardWriter {
// Create an instance that is a simple wrapper around clipboard.
ScopedClipboardWriter(Clipboard* clipboard, Clipboard::Buffer buffer);
- ScopedClipboardWriter(Clipboard* clipboard,
- Clipboard::Buffer buffer,
- SourceTag source_tag);
-
~ScopedClipboardWriter();
// Converts |text| to UTF-8 and adds it to the clipboard.
@@ -82,7 +78,6 @@ class UI_EXPORT ScopedClipboardWriter {
Clipboard::ObjectMap objects_;
Clipboard* clipboard_;
Clipboard::Buffer buffer_;
- SourceTag source_tag_;
// We keep around the UTF-8 text of the URL in order to pass it to
// Clipboard::DidWriteURL().
diff --git a/ui/base/cocoa/animation_utils.h b/ui/base/cocoa/animation_utils.h
new file mode 100644
index 0000000000..89e8fff8e0
--- /dev/null
+++ b/ui/base/cocoa/animation_utils.h
@@ -0,0 +1,62 @@
+// Copyright 2013 The Chromium Authors. 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_BASE_COCOA_ANIMATION_UTILS_H
+#define UI_BASE_COCOA_ANIMATION_UTILS_H
+
+#import <Cocoa/Cocoa.h>
+#import <QuartzCore/QuartzCore.h>
+
+// This class is a stack-based helper useful for unit testing of Cocoa UI,
+// and any other situation where you want to temporarily turn off Cocoa
+// animation for the life of a function call or other limited scope.
+// Just declare one of these, and all animations will complete instantly until
+// this goes out of scope and pops our state off the Core Animation stack.
+//
+// Example:
+// MyUnitTest() {
+// WithNoAnimation at_all; // Turn off Cocoa auto animation in this scope.
+
+
+class WithNoAnimation {
+ public:
+ WithNoAnimation() {
+ [NSAnimationContext beginGrouping];
+ [[NSAnimationContext currentContext] setDuration:0.0];
+ }
+
+ ~WithNoAnimation() {
+ [NSAnimationContext endGrouping];
+ }
+};
+
+// Disables actions within a scope.
+class ScopedCAActionDisabler {
+ public:
+ ScopedCAActionDisabler() {
+ [CATransaction begin];
+ [CATransaction setValue:[NSNumber numberWithBool:YES]
+ forKey:kCATransactionDisableActions];
+ }
+
+ ~ScopedCAActionDisabler() {
+ [CATransaction commit];
+ }
+};
+
+// Sets a duration on actions within a scope.
+class ScopedCAActionSetDuration {
+ public:
+ explicit ScopedCAActionSetDuration(NSTimeInterval duration) {
+ [CATransaction begin];
+ [CATransaction setValue:[NSNumber numberWithFloat:duration]
+ forKey:kCATransactionAnimationDuration];
+ }
+
+ ~ScopedCAActionSetDuration() {
+ [CATransaction commit];
+ }
+};
+
+#endif // UI_BASE_COCOA_ANIMATION_UTILS_H
diff --git a/ui/base/cocoa/cocoa_event_utils.h b/ui/base/cocoa/cocoa_event_utils.h
new file mode 100644
index 0000000000..1432f2dd6b
--- /dev/null
+++ b/ui/base/cocoa/cocoa_event_utils.h
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. 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_BASE_COCOA_COCOA_EVENT_UTILS_H_
+#define UI_BASE_COCOA_COCOA_EVENT_UTILS_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "ui/base/ui_export.h"
+#include "ui/base/window_open_disposition.h"
+
+namespace ui {
+
+// Retrieves a bitsum of ui::EventFlags represented by |event|,
+UI_EXPORT int EventFlagsFromNSEvent(NSEvent* event);
+
+// Retrieves a bitsum of ui::EventFlags represented by |event|,
+// but instead use the modifier flags given by |modifiers|,
+// which is the same format as |-NSEvent modifierFlags|. This allows
+// substitution of the modifiers without having to create a new event from
+// scratch.
+UI_EXPORT int EventFlagsFromNSEventWithModifiers(NSEvent* event,
+ NSUInteger modifiers);
+
+// Retrieves the WindowOpenDisposition used to open a link from a user gesture
+// represented by |event|. For example, a Cmd+Click would mean open the
+// associated link in a background tab.
+UI_EXPORT WindowOpenDisposition WindowOpenDispositionFromNSEvent(
+ NSEvent* event);
+
+// Retrieves the WindowOpenDisposition used to open a link from a user gesture
+// represented by |event|, but instead use the modifier flags given by |flags|,
+// which is the same format as |-NSEvent modifierFlags|. This allows
+// substitution of the modifiers without having to create a new event from
+// scratch.
+UI_EXPORT WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
+ NSEvent* event, NSUInteger flags);
+
+} // namespace ui
+
+#endif // UI_BASE_COCOA_COCOA_EVENT_UTILS_H_
diff --git a/ui/base/cocoa/cocoa_event_utils.mm b/ui/base/cocoa/cocoa_event_utils.mm
new file mode 100644
index 0000000000..1920699236
--- /dev/null
+++ b/ui/base/cocoa/cocoa_event_utils.mm
@@ -0,0 +1,70 @@
+// Copyright 2013 The Chromium 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 "ui/base/cocoa/cocoa_event_utils.h"
+
+#include "ui/base/events/event_constants.h"
+#include "ui/base/window_open_disposition.h"
+
+namespace {
+
+bool isLeftButtonEvent(NSEvent* event) {
+ NSEventType type = [event type];
+ return type == NSLeftMouseDown ||
+ type == NSLeftMouseDragged ||
+ type == NSLeftMouseUp;
+}
+
+bool isRightButtonEvent(NSEvent* event) {
+ NSEventType type = [event type];
+ return type == NSRightMouseDown ||
+ type == NSRightMouseDragged ||
+ type == NSRightMouseUp;
+}
+
+bool isMiddleButtonEvent(NSEvent* event) {
+ if ([event buttonNumber] != 2)
+ return false;
+
+ NSEventType type = [event type];
+ return type == NSOtherMouseDown ||
+ type == NSOtherMouseDragged ||
+ type == NSOtherMouseUp;
+}
+
+} // namespace
+
+namespace ui {
+
+// Retrieves a bitsum of ui::EventFlags from NSEvent.
+int EventFlagsFromNSEvent(NSEvent* event) {
+ NSUInteger modifiers = [event modifierFlags];
+ return EventFlagsFromNSEventWithModifiers(event, modifiers);
+}
+
+int EventFlagsFromNSEventWithModifiers(NSEvent* event, NSUInteger modifiers) {
+ int flags = 0;
+ flags |= (modifiers & NSAlphaShiftKeyMask) ? ui::EF_CAPS_LOCK_DOWN : 0;
+ flags |= (modifiers & NSShiftKeyMask) ? ui::EF_SHIFT_DOWN : 0;
+ flags |= (modifiers & NSControlKeyMask) ? ui::EF_CONTROL_DOWN : 0;
+ flags |= (modifiers & NSAlternateKeyMask) ? ui::EF_ALT_DOWN : 0;
+ flags |= (modifiers & NSCommandKeyMask) ? ui::EF_COMMAND_DOWN : 0;
+ flags |= isLeftButtonEvent(event) ? ui::EF_LEFT_MOUSE_BUTTON : 0;
+ flags |= isRightButtonEvent(event) ? ui::EF_RIGHT_MOUSE_BUTTON : 0;
+ flags |= isMiddleButtonEvent(event) ? ui::EF_MIDDLE_MOUSE_BUTTON : 0;
+ return flags;
+}
+
+WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) {
+ NSUInteger modifiers = [event modifierFlags];
+ return WindowOpenDispositionFromNSEventWithFlags(event, modifiers);
+}
+
+WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
+ NSEvent* event, NSUInteger modifiers) {
+ int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers);
+ return ui::DispositionFromEventFlags(event_flags);
+}
+
+} // namespace ui
diff --git a/ui/base/cocoa/cocoa_event_utils_unittest.mm b/ui/base/cocoa/cocoa_event_utils_unittest.mm
new file mode 100644
index 0000000000..cb5f68a407
--- /dev/null
+++ b/ui/base/cocoa/cocoa_event_utils_unittest.mm
@@ -0,0 +1,128 @@
+// Copyright 2013 The Chromium 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 <objc/objc-class.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+#include "ui/base/cocoa/cocoa_event_utils.h"
+#include "ui/base/events/event_constants.h"
+#import "ui/base/test/cocoa_test_event_utils.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
+
+// We provide a donor class with a specially modified |modifierFlags|
+// implementation that we swap with NSEvent's. This is because we can't create a
+// NSEvent that represents a middle click with modifiers.
+@interface TestEvent : NSObject
+@end
+@implementation TestEvent
+- (NSUInteger)modifierFlags { return NSShiftKeyMask; }
+@end
+
+namespace ui {
+
+namespace {
+
+class EventUtilsTest : public CocoaTest {
+};
+
+TEST_F(EventUtilsTest, TestWindowOpenDispositionFromNSEvent) {
+ // Left Click = same tab.
+ NSEvent* me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 0);
+ EXPECT_EQ(CURRENT_TAB, WindowOpenDispositionFromNSEvent(me));
+
+ // Middle Click = new background tab.
+ me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, 0);
+ EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me));
+
+ // Shift+Middle Click = new foreground tab.
+ {
+ ScopedClassSwizzler swizzler([NSEvent class], [TestEvent class],
+ @selector(modifierFlags));
+ me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp,
+ NSShiftKeyMask);
+ EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me));
+ }
+
+ // Cmd+Left Click = new background tab.
+ me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSCommandKeyMask);
+ EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me));
+
+ // Cmd+Shift+Left Click = new foreground tab.
+ me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSCommandKeyMask |
+ NSShiftKeyMask);
+ EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me));
+
+ // Shift+Left Click = new window
+ me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSShiftKeyMask);
+ EXPECT_EQ(NEW_WINDOW, WindowOpenDispositionFromNSEvent(me));
+}
+
+
+TEST_F(EventUtilsTest, TestEventFlagsFromNSEvent) {
+ // Left click.
+ NSEvent* left = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 0);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON, EventFlagsFromNSEvent(left));
+
+ // Right click.
+ NSEvent* right = cocoa_test_event_utils::MouseEventWithType(NSRightMouseUp,
+ 0);
+ EXPECT_EQ(EF_RIGHT_MOUSE_BUTTON, EventFlagsFromNSEvent(right));
+
+ // Middle click.
+ NSEvent* middle = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp,
+ 0);
+ EXPECT_EQ(EF_MIDDLE_MOUSE_BUTTON, EventFlagsFromNSEvent(middle));
+
+ // Caps + Left
+ NSEvent* caps =
+ cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSAlphaShiftKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_CAPS_LOCK_DOWN,
+ EventFlagsFromNSEvent(caps));
+
+ // Shift + Left
+ NSEvent* shift = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSShiftKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_SHIFT_DOWN, EventFlagsFromNSEvent(shift));
+
+ // Ctrl + Left
+ NSEvent* ctrl = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSControlKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_CONTROL_DOWN,
+ EventFlagsFromNSEvent(ctrl));
+
+ // Alt + Left
+ NSEvent* alt = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSAlternateKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_ALT_DOWN, EventFlagsFromNSEvent(alt));
+
+ // Cmd + Left
+ NSEvent* cmd = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSCommandKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_COMMAND_DOWN, EventFlagsFromNSEvent(cmd));
+
+ // Shift + Ctrl + Left
+ NSEvent* shiftctrl =
+ cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSShiftKeyMask |
+ NSControlKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_SHIFT_DOWN | EF_CONTROL_DOWN,
+ EventFlagsFromNSEvent(shiftctrl));
+
+ // Cmd + Alt + Right
+ NSEvent* cmdalt =
+ cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp,
+ NSCommandKeyMask |
+ NSAlternateKeyMask);
+ EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_COMMAND_DOWN | EF_ALT_DOWN,
+ EventFlagsFromNSEvent(cmdalt));
+}
+
+} // namespace
+
+} // namespace ui
diff --git a/ui/base/cocoa/flipped_view.h b/ui/base/cocoa/flipped_view.h
new file mode 100644
index 0000000000..c05f38c6c0
--- /dev/null
+++ b/ui/base/cocoa/flipped_view.h
@@ -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.
+
+#ifndef UI_BASE_COCOA_FLIPPED_VIEW_H_
+#define UI_BASE_COCOA_FLIPPED_VIEW_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "ui/base/ui_export.h"
+
+// A view where the Y axis is flipped such that the origin is at the top left
+// and Y value increases downwards. Drawing is flipped so that layout of the
+// sections is easier. Apple recommends flipping the coordinate origin when
+// doing a lot of text layout because it's more natural.
+UI_EXPORT
+@interface FlippedView : NSView
+@end
+
+#endif // UI_BASE_COCOA_FLIPPED_VIEW_H_
diff --git a/ui/base/cocoa/flipped_view.mm b/ui/base/cocoa/flipped_view.mm
new file mode 100644
index 0000000000..57c16477a9
--- /dev/null
+++ b/ui/base/cocoa/flipped_view.mm
@@ -0,0 +1,13 @@
+// Copyright 2013 The Chromium 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 "ui/base/cocoa/flipped_view.h"
+
+@implementation FlippedView
+
+- (BOOL)isFlipped {
+ return YES;
+}
+
+@end
diff --git a/ui/base/cocoa/hover_button.h b/ui/base/cocoa/hover_button.h
index 0434985fd5..e665d3a6a7 100644
--- a/ui/base/cocoa/hover_button.h
+++ b/ui/base/cocoa/hover_button.h
@@ -26,7 +26,7 @@ UI_EXPORT
HoverState hoverState_;
@private
- // Tracking area for button mouseover states.
+ // Tracking area for button mouseover states. Nil if not enabled.
ui::ScopedCrTrackingArea trackingArea_;
}
diff --git a/ui/base/cocoa/hover_button.mm b/ui/base/cocoa/hover_button.mm
index fc9297f9e5..a234898656 100644
--- a/ui/base/cocoa/hover_button.mm
+++ b/ui/base/cocoa/hover_button.mm
@@ -29,11 +29,13 @@
}
- (void)mouseEntered:(NSEvent*)theEvent {
- self.hoverState = kHoverStateMouseOver;
+ if (trackingArea_.get())
+ self.hoverState = kHoverStateMouseOver;
}
- (void)mouseExited:(NSEvent*)theEvent {
- self.hoverState = kHoverStateNone;
+ if (trackingArea_.get())
+ self.hoverState = kHoverStateNone;
}
- (void)mouseDown:(NSEvent*)theEvent {
diff --git a/ui/base/cocoa/menu_controller.h b/ui/base/cocoa/menu_controller.h
new file mode 100644
index 0000000000..3b9718fbf2
--- /dev/null
+++ b/ui/base/cocoa/menu_controller.h
@@ -0,0 +1,88 @@
+// Copyright 2013 The Chromium Authors. 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_BASE_COCOA_MENU_CONTROLLER_H_
+#define UI_BASE_COCOA_MENU_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_nsobject.h"
+#include "base/string16.h"
+#include "ui/base/ui_export.h"
+
+namespace ui {
+class MenuModel;
+}
+
+// A controller for the cross-platform menu model. The menu that's created
+// has the tag and represented object set for each menu item. The object is a
+// NSValue holding a pointer to the model for that level of the menu (to
+// allow for hierarchical menus). The tag is the index into that model for
+// that particular item. It is important that the model outlives this object
+// as it only maintains weak references.
+UI_EXPORT
+@interface MenuController : NSObject<NSMenuDelegate> {
+ @protected
+ ui::MenuModel* model_; // weak
+ scoped_nsobject<NSMenu> menu_;
+ BOOL useWithPopUpButtonCell_; // If YES, 0th item is blank
+ BOOL isMenuOpen_;
+}
+
+@property(nonatomic, assign) ui::MenuModel* model;
+// Note that changing this will have no effect if you use
+// |-initWithModel:useWithPopUpButtonCell:| or after the first call to |-menu|.
+@property(nonatomic) BOOL useWithPopUpButtonCell;
+
++ (string16)elideMenuTitle:(const string16&)title
+ toWidth:(int)width;
+
+// NIB-based initializer. This does not create a menu. Clients can set the
+// properties of the object and the menu will be created upon the first call to
+// |-menu|. Note that the menu will be immutable after creation.
+- (id)init;
+
+// Builds a NSMenu from the pre-built model (must not be nil). Changes made
+// to the contents of the model after calling this will not be noticed. If
+// the menu will be displayed by a NSPopUpButtonCell, it needs to be of a
+// slightly different form (0th item is empty). Note this attribute of the menu
+// cannot be changed after it has been created.
+- (id)initWithModel:(ui::MenuModel*)model
+ useWithPopUpButtonCell:(BOOL)useWithCell;
+
+// Programmatically close the constructed menu.
+- (void)cancel;
+
+// Access to the constructed menu if the complex initializer was used. If the
+// default initializer was used, then this will create the menu on first call.
+- (NSMenu*)menu;
+
+// Whether the menu is currently open.
+- (BOOL)isMenuOpen;
+
+// NSMenuDelegate methods this class implements. Subclasses should call super
+// if extending the behavior.
+- (void)menuWillOpen:(NSMenu*)menu;
+- (void)menuDidClose:(NSMenu*)menu;
+
+@end
+
+// Exposed only for unit testing, do not call directly.
+@interface MenuController (PrivateExposedForTesting)
+- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item;
+@end
+
+// Protected methods that subclassers can override.
+@interface MenuController (Protected)
+- (void)addItemToMenu:(NSMenu*)menu
+ atIndex:(NSInteger)index
+ fromModel:(ui::MenuModel*)model;
+- (NSMenu*)menuFromModel:(ui::MenuModel*)model;
+// Returns the maximum width for the menu item. Returns -1 to indicate
+// that there's no maximum width.
+- (int)maxWidthForMenuModel:(ui::MenuModel*)model
+ modelIndex:(int)modelIndex;
+@end
+
+#endif // UI_BASE_COCOA_MENU_CONTROLLER_H_
diff --git a/ui/base/cocoa/menu_controller.mm b/ui/base/cocoa/menu_controller.mm
new file mode 100644
index 0000000000..cd03077db7
--- /dev/null
+++ b/ui/base/cocoa/menu_controller.mm
@@ -0,0 +1,234 @@
+// Copyright 2013 The Chromium 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 "ui/base/cocoa/menu_controller.h"
+
+#include "base/logging.h"
+#include "base/strings/sys_string_conversions.h"
+#include "ui/base/accelerators/accelerator.h"
+#include "ui/base/accelerators/platform_accelerator_cocoa.h"
+#import "ui/base/cocoa/cocoa_event_utils.h"
+#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/base/models/simple_menu_model.h"
+#include "ui/base/text/text_elider.h"
+#include "ui/gfx/image/image.h"
+
+@interface MenuController (Private)
+- (void)addSeparatorToMenu:(NSMenu*)menu
+ atIndex:(int)index;
+@end
+
+@implementation MenuController
+
+@synthesize model = model_;
+@synthesize useWithPopUpButtonCell = useWithPopUpButtonCell_;
+
++ (string16)elideMenuTitle:(const string16&)title
+ toWidth:(int)width {
+ NSFont* nsfont = [NSFont menuBarFontOfSize:0]; // 0 means "default"
+ gfx::Font font(base::SysNSStringToUTF8([nsfont fontName]),
+ static_cast<int>([nsfont pointSize]));
+ return ui::ElideText(title, font, width, ui::ELIDE_AT_END);
+}
+
+- (id)init {
+ self = [super init];
+ return self;
+}
+
+- (id)initWithModel:(ui::MenuModel*)model
+ useWithPopUpButtonCell:(BOOL)useWithCell {
+ if ((self = [super init])) {
+ model_ = model;
+ useWithPopUpButtonCell_ = useWithCell;
+ [self menu];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [menu_ setDelegate:nil];
+
+ // Close the menu if it is still open. This could happen if a tab gets closed
+ // while its context menu is still open.
+ [self cancel];
+
+ model_ = NULL;
+ [super dealloc];
+}
+
+- (void)cancel {
+ if (isMenuOpen_) {
+ [menu_ cancelTracking];
+ model_->MenuClosed();
+ isMenuOpen_ = NO;
+ }
+}
+
+// Creates a NSMenu from the given model. If the model has submenus, this can
+// be invoked recursively.
+- (NSMenu*)menuFromModel:(ui::MenuModel*)model {
+ NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
+
+ const int count = model->GetItemCount();
+ for (int index = 0; index < count; index++) {
+ if (model->GetTypeAt(index) == ui::MenuModel::TYPE_SEPARATOR)
+ [self addSeparatorToMenu:menu atIndex:index];
+ else
+ [self addItemToMenu:menu atIndex:index fromModel:model];
+ }
+
+ return menu;
+}
+
+- (int)maxWidthForMenuModel:(ui::MenuModel*)model
+ modelIndex:(int)modelIndex {
+ return -1;
+}
+
+// Adds a separator item at the given index. As the separator doesn't need
+// anything from the model, this method doesn't need the model index as the
+// other method below does.
+- (void)addSeparatorToMenu:(NSMenu*)menu
+ atIndex:(int)index {
+ NSMenuItem* separator = [NSMenuItem separatorItem];
+ [menu insertItem:separator atIndex:index];
+}
+
+// Adds an item or a hierarchical menu to the item at the |index|,
+// associated with the entry in the model identified by |modelIndex|.
+- (void)addItemToMenu:(NSMenu*)menu
+ atIndex:(NSInteger)index
+ fromModel:(ui::MenuModel*)model {
+ string16 label16 = model->GetLabelAt(index);
+ int maxWidth = [self maxWidthForMenuModel:model modelIndex:index];
+ if (maxWidth != -1)
+ label16 = [MenuController elideMenuTitle:label16 toWidth:maxWidth];
+
+ NSString* label = l10n_util::FixUpWindowsStyleLabel(label16);
+ scoped_nsobject<NSMenuItem> item(
+ [[NSMenuItem alloc] initWithTitle:label
+ action:@selector(itemSelected:)
+ keyEquivalent:@""]);
+
+ // If the menu item has an icon, set it.
+ gfx::Image icon;
+ if (model->GetIconAt(index, &icon) && !icon.IsEmpty())
+ [item setImage:icon.ToNSImage()];
+
+ ui::MenuModel::ItemType type = model->GetTypeAt(index);
+ if (type == ui::MenuModel::TYPE_SUBMENU) {
+ // Recursively build a submenu from the sub-model at this index.
+ [item setTarget:nil];
+ [item setAction:nil];
+ ui::MenuModel* submenuModel = model->GetSubmenuModelAt(index);
+ NSMenu* submenu =
+ [self menuFromModel:(ui::SimpleMenuModel*)submenuModel];
+ [item setSubmenu:submenu];
+ } else {
+ // The MenuModel works on indexes so we can't just set the command id as the
+ // tag like we do in other menus. Also set the represented object to be
+ // the model so hierarchical menus check the correct index in the correct
+ // model. Setting the target to |self| allows this class to participate
+ // in validation of the menu items.
+ [item setTag:index];
+ [item setTarget:self];
+ NSValue* modelObject = [NSValue valueWithPointer:model];
+ [item setRepresentedObject:modelObject]; // Retains |modelObject|.
+ ui::Accelerator accelerator;
+ if (model->GetAcceleratorAt(index, &accelerator)) {
+ const ui::PlatformAcceleratorCocoa* platformAccelerator =
+ static_cast<const ui::PlatformAcceleratorCocoa*>(
+ accelerator.platform_accelerator());
+ if (platformAccelerator) {
+ [item setKeyEquivalent:platformAccelerator->characters()];
+ [item setKeyEquivalentModifierMask:
+ platformAccelerator->modifier_mask()];
+ }
+ }
+ }
+ [menu insertItem:item atIndex:index];
+}
+
+// Called before the menu is to be displayed to update the state (enabled,
+// radio, etc) of each item in the menu. Also will update the title if
+// the item is marked as "dynamic".
+- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item {
+ SEL action = [item action];
+ if (action != @selector(itemSelected:))
+ return NO;
+
+ NSInteger modelIndex = [item tag];
+ ui::MenuModel* model =
+ static_cast<ui::MenuModel*>(
+ [[(id)item representedObject] pointerValue]);
+ DCHECK(model);
+ if (model) {
+ BOOL checked = model->IsItemCheckedAt(modelIndex);
+ DCHECK([(id)item isKindOfClass:[NSMenuItem class]]);
+ [(id)item setState:(checked ? NSOnState : NSOffState)];
+ [(id)item setHidden:(!model->IsVisibleAt(modelIndex))];
+ if (model->IsItemDynamicAt(modelIndex)) {
+ // Update the label and the icon.
+ NSString* label =
+ l10n_util::FixUpWindowsStyleLabel(model->GetLabelAt(modelIndex));
+ [(id)item setTitle:label];
+
+ gfx::Image icon;
+ model->GetIconAt(modelIndex, &icon);
+ [(id)item setImage:icon.IsEmpty() ? nil : icon.ToNSImage()];
+ }
+ return model->IsEnabledAt(modelIndex);
+ }
+ return NO;
+}
+
+// Called when the user chooses a particular menu item. |sender| is the menu
+// item chosen.
+- (void)itemSelected:(id)sender {
+ NSInteger modelIndex = [sender tag];
+ ui::MenuModel* model =
+ static_cast<ui::MenuModel*>(
+ [[sender representedObject] pointerValue]);
+ DCHECK(model);
+ if (model) {
+ int event_flags = ui::EventFlagsFromNSEvent([NSApp currentEvent]);
+ model->ActivatedAt(modelIndex, event_flags);
+ }
+}
+
+- (NSMenu*)menu {
+ if (!menu_ && model_) {
+ menu_.reset([[self menuFromModel:model_] retain]);
+ [menu_ setDelegate:self];
+ // If this is to be used with a NSPopUpButtonCell, add an item at the 0th
+ // position that's empty. Doing it after the menu has been constructed won't
+ // complicate creation logic, and since the tags are model indexes, they
+ // are unaffected by the extra item.
+ if (useWithPopUpButtonCell_) {
+ scoped_nsobject<NSMenuItem> blankItem(
+ [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]);
+ [menu_ insertItem:blankItem atIndex:0];
+ }
+ }
+ return menu_.get();
+}
+
+- (BOOL)isMenuOpen {
+ return isMenuOpen_;
+}
+
+- (void)menuWillOpen:(NSMenu*)menu {
+ isMenuOpen_ = YES;
+ model_->MenuWillShow();
+}
+
+- (void)menuDidClose:(NSMenu*)menu {
+ if (isMenuOpen_) {
+ model_->MenuClosed();
+ isMenuOpen_ = NO;
+ }
+}
+
+@end
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm
new file mode 100644
index 0000000000..d0237c6e78
--- /dev/null
+++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -0,0 +1,362 @@
+// Copyright 2013 The Chromium 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 <Cocoa/Cocoa.h>
+
+#include "base/message_loop.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
+#include "grit/ui_resources.h"
+#include "grit/ui_strings.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#import "ui/base/cocoa/menu_controller.h"
+#include "ui/base/models/simple_menu_model.h"
+#include "ui/base/resource/resource_bundle.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
+#include "ui/gfx/image/image.h"
+
+namespace ui {
+
+namespace {
+
+const int kTestLabelResourceId = IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE;
+
+class MenuControllerTest : public CocoaTest {
+};
+
+// A menu delegate that counts the number of times certain things are called
+// to make sure things are hooked up properly.
+class Delegate : public SimpleMenuModel::Delegate {
+ public:
+ Delegate()
+ : execute_count_(0),
+ enable_count_(0),
+ menu_to_close_(nil),
+ did_show_(false),
+ did_close_(false) {
+ }
+
+ virtual bool IsCommandIdChecked(int command_id) const OVERRIDE {
+ return false;
+ }
+ virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
+ ++enable_count_;
+ return true;
+ }
+ virtual bool GetAcceleratorForCommandId(
+ int command_id,
+ Accelerator* accelerator) OVERRIDE { return false; }
+ virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {
+ ++execute_count_;
+ }
+
+ virtual void MenuWillShow(SimpleMenuModel* /*source*/) OVERRIDE {
+ EXPECT_FALSE(did_show_);
+ EXPECT_FALSE(did_close_);
+ did_show_ = true;
+ NSArray* modes = [NSArray arrayWithObjects:NSEventTrackingRunLoopMode,
+ NSDefaultRunLoopMode,
+ nil];
+ [menu_to_close_ performSelector:@selector(cancelTracking)
+ withObject:nil
+ afterDelay:0.1
+ inModes:modes];
+ }
+
+ virtual void MenuClosed(SimpleMenuModel* /*source*/) OVERRIDE {
+ EXPECT_TRUE(did_show_);
+ EXPECT_FALSE(did_close_);
+ did_close_ = true;
+ }
+
+ int execute_count_;
+ mutable int enable_count_;
+ // The menu on which to call |-cancelTracking| after a short delay in
+ // MenuWillShow.
+ NSMenu* menu_to_close_;
+ bool did_show_;
+ bool did_close_;
+};
+
+// Just like Delegate, except the items are treated as "dynamic" so updates to
+// the label/icon in the model are reflected in the menu.
+class DynamicDelegate : public Delegate {
+ public:
+ DynamicDelegate() {}
+ virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE {
+ return true;
+ }
+ virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE {
+ return label_;
+ }
+ virtual bool GetIconForCommandId(
+ int command_id,
+ gfx::Image* icon) const OVERRIDE {
+ if (icon_.IsEmpty()) {
+ return false;
+ } else {
+ *icon = icon_;
+ return true;
+ }
+ }
+ void SetDynamicLabel(string16 label) { label_ = label; }
+ void SetDynamicIcon(const gfx::Image& icon) { icon_ = icon; }
+
+ private:
+ string16 label_;
+ gfx::Image icon_;
+};
+
+TEST_F(MenuControllerTest, EmptyMenu) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 0);
+}
+
+TEST_F(MenuControllerTest, BasicCreation) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ model.AddItem(2, ASCIIToUTF16("two"));
+ model.AddItem(3, ASCIIToUTF16("three"));
+ model.AddSeparator(NORMAL_SEPARATOR);
+ model.AddItem(4, ASCIIToUTF16("four"));
+ model.AddItem(5, ASCIIToUTF16("five"));
+
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 6);
+
+ // Check the title, tag, and represented object are correct for a random
+ // element.
+ NSMenuItem* itemTwo = [[menu menu] itemAtIndex:2];
+ NSString* title = [itemTwo title];
+ EXPECT_EQ(ASCIIToUTF16("three"), base::SysNSStringToUTF16(title));
+ EXPECT_EQ([itemTwo tag], 2);
+ EXPECT_EQ([[itemTwo representedObject] pointerValue], &model);
+
+ EXPECT_TRUE([[[menu menu] itemAtIndex:3] isSeparatorItem]);
+}
+
+TEST_F(MenuControllerTest, Submenus) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ SimpleMenuModel submodel(&delegate);
+ submodel.AddItem(2, ASCIIToUTF16("sub-one"));
+ submodel.AddItem(3, ASCIIToUTF16("sub-two"));
+ submodel.AddItem(4, ASCIIToUTF16("sub-three"));
+ model.AddSubMenuWithStringId(5, kTestLabelResourceId, &submodel);
+ model.AddItem(6, ASCIIToUTF16("three"));
+
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 3);
+
+ // Inspect the submenu to ensure it has correct properties.
+ NSMenu* submenu = [[[menu menu] itemAtIndex:1] submenu];
+ EXPECT_TRUE(submenu);
+ EXPECT_EQ([submenu numberOfItems], 3);
+
+ // Inspect one of the items to make sure it has the correct model as its
+ // represented object and the proper tag.
+ NSMenuItem* submenuItem = [submenu itemAtIndex:1];
+ NSString* title = [submenuItem title];
+ EXPECT_EQ(ASCIIToUTF16("sub-two"), base::SysNSStringToUTF16(title));
+ EXPECT_EQ([submenuItem tag], 1);
+ EXPECT_EQ([[submenuItem representedObject] pointerValue], &submodel);
+
+ // Make sure the item after the submenu is correct and its represented
+ // object is back to the top model.
+ NSMenuItem* item = [[menu menu] itemAtIndex:2];
+ title = [item title];
+ EXPECT_EQ(ASCIIToUTF16("three"), base::SysNSStringToUTF16(title));
+ EXPECT_EQ([item tag], 2);
+ EXPECT_EQ([[item representedObject] pointerValue], &model);
+}
+
+TEST_F(MenuControllerTest, EmptySubmenu) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ SimpleMenuModel submodel(&delegate);
+ model.AddSubMenuWithStringId(2, kTestLabelResourceId, &submodel);
+
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 2);
+}
+
+TEST_F(MenuControllerTest, PopUpButton) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ model.AddItem(2, ASCIIToUTF16("two"));
+ model.AddItem(3, ASCIIToUTF16("three"));
+
+ // Menu should have an extra item inserted at position 0 that has an empty
+ // title.
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:YES]);
+ EXPECT_EQ([[menu menu] numberOfItems], 4);
+ EXPECT_EQ(base::SysNSStringToUTF16([[[menu menu] itemAtIndex:0] title]),
+ string16());
+
+ // Make sure the tags are still correct (the index no longer matches the tag).
+ NSMenuItem* itemTwo = [[menu menu] itemAtIndex:2];
+ EXPECT_EQ([itemTwo tag], 1);
+}
+
+TEST_F(MenuControllerTest, Execute) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 1);
+
+ // Fake selecting the menu item, we expect the delegate to be told to execute
+ // a command.
+ NSMenuItem* item = [[menu menu] itemAtIndex:0];
+ [[item target] performSelector:[item action] withObject:item];
+ EXPECT_EQ(delegate.execute_count_, 1);
+}
+
+void Validate(MenuController* controller, NSMenu* menu) {
+ for (int i = 0; i < [menu numberOfItems]; ++i) {
+ NSMenuItem* item = [menu itemAtIndex:i];
+ [controller validateUserInterfaceItem:item];
+ if ([item hasSubmenu])
+ Validate(controller, [item submenu]);
+ }
+}
+
+TEST_F(MenuControllerTest, Validate) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ model.AddItem(2, ASCIIToUTF16("two"));
+ SimpleMenuModel submodel(&delegate);
+ submodel.AddItem(2, ASCIIToUTF16("sub-one"));
+ model.AddSubMenuWithStringId(3, kTestLabelResourceId, &submodel);
+
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 3);
+
+ Validate(menu.get(), [menu menu]);
+}
+
+TEST_F(MenuControllerTest, DefaultInitializer) {
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("one"));
+ model.AddItem(2, ASCIIToUTF16("two"));
+ model.AddItem(3, ASCIIToUTF16("three"));
+
+ scoped_nsobject<MenuController> menu([[MenuController alloc] init]);
+ EXPECT_FALSE([menu menu]);
+
+ [menu setModel:&model];
+ [menu setUseWithPopUpButtonCell:NO];
+ EXPECT_TRUE([menu menu]);
+ EXPECT_EQ(3, [[menu menu] numberOfItems]);
+
+ // Check immutability.
+ model.AddItem(4, ASCIIToUTF16("four"));
+ EXPECT_EQ(3, [[menu menu] numberOfItems]);
+}
+
+// Test that menus with dynamic labels actually get updated.
+TEST_F(MenuControllerTest, Dynamic) {
+ DynamicDelegate delegate;
+
+ // Create a menu containing a single item whose label is "initial" and who has
+ // no icon.
+ string16 initial = ASCIIToUTF16("initial");
+ delegate.SetDynamicLabel(initial);
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("foo"));
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ EXPECT_EQ([[menu menu] numberOfItems], 1);
+ // Validate() simulates opening the menu - the item label/icon should be
+ // initialized after this so we can validate the menu contents.
+ Validate(menu.get(), [menu menu]);
+ NSMenuItem* item = [[menu menu] itemAtIndex:0];
+ // Item should have the "initial" label and no icon.
+ EXPECT_EQ(initial, base::SysNSStringToUTF16([item title]));
+ EXPECT_EQ(nil, [item image]);
+
+ // Now update the item to have a label of "second" and an icon.
+ string16 second = ASCIIToUTF16("second");
+ delegate.SetDynamicLabel(second);
+ const gfx::Image& icon =
+ ResourceBundle::GetSharedInstance().GetNativeImageNamed(IDR_THROBBER);
+ delegate.SetDynamicIcon(icon);
+ // Simulate opening the menu and validate that the item label + icon changes.
+ Validate(menu.get(), [menu menu]);
+ EXPECT_EQ(second, base::SysNSStringToUTF16([item title]));
+ EXPECT_TRUE([item image] != nil);
+
+ // Now get rid of the icon and make sure it goes away.
+ delegate.SetDynamicIcon(gfx::Image());
+ Validate(menu.get(), [menu menu]);
+ EXPECT_EQ(second, base::SysNSStringToUTF16([item title]));
+ EXPECT_EQ(nil, [item image]);
+}
+
+TEST_F(MenuControllerTest, OpenClose) {
+ // SimpleMenuModel posts a task that calls Delegate::MenuClosed. Create
+ // a MessageLoop for that purpose.
+ base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
+
+ // Create the model.
+ Delegate delegate;
+ SimpleMenuModel model(&delegate);
+ model.AddItem(1, ASCIIToUTF16("allays"));
+ model.AddItem(2, ASCIIToUTF16("i"));
+ model.AddItem(3, ASCIIToUTF16("bf"));
+
+ // Create the controller.
+ scoped_nsobject<MenuController> menu(
+ [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
+ delegate.menu_to_close_ = [menu menu];
+
+ EXPECT_FALSE([menu isMenuOpen]);
+
+ // In the event tracking run loop mode of the menu, verify that the controller
+ // resports the menu as open.
+ CFRunLoopPerformBlock(CFRunLoopGetCurrent(), NSEventTrackingRunLoopMode, ^{
+ EXPECT_TRUE([menu isMenuOpen]);
+ });
+
+ // Pop open the menu, which will spin an event-tracking run loop.
+ [NSMenu popUpContextMenu:[menu menu]
+ withEvent:nil
+ forView:[test_window() contentView]];
+
+ EXPECT_FALSE([menu isMenuOpen]);
+
+ // When control returns back to here, the menu will have finished running its
+ // loop and will have closed itself (see Delegate::MenuWillShow).
+ EXPECT_TRUE(delegate.did_show_);
+
+ // When the menu tells the Model it closed, the Model posts a task to notify
+ // the delegate. But since this is a test and there's no running MessageLoop,
+ // |did_close_| will remain false until we pump the task manually.
+ EXPECT_FALSE(delegate.did_close_);
+
+ // Pump the task that notifies the delegate.
+ message_loop.RunUntilIdle();
+
+ // Expect that the delegate got notified properly.
+ EXPECT_TRUE(delegate.did_close_);
+}
+
+} // namespace
+
+} // namespace ui
diff --git a/ui/base/cocoa/underlay_opengl_hosting_window.mm b/ui/base/cocoa/underlay_opengl_hosting_window.mm
index 92544c9b2b..3069bd275b 100644
--- a/ui/base/cocoa/underlay_opengl_hosting_window.mm
+++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm
@@ -56,7 +56,8 @@ NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) {
// (This is an undocumented side-effect.) At that time, verify that any
// OpaqueViews are z-ordered in the front, and enforce it if need be.
- NSView* rootView = [[[self window] contentView] superview];
+ NSView* rootView = [self superview];
+ DCHECK_EQ((NSView*)nil, [rootView superview]);
NSArray* subviews = [rootView subviews];
// If a window has any opaques, it will have exactly two.
diff --git a/ui/base/cocoa/view_description.h b/ui/base/cocoa/view_description.h
new file mode 100644
index 0000000000..727ad15db0
--- /dev/null
+++ b/ui/base/cocoa/view_description.h
@@ -0,0 +1,21 @@
+// 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 UI_BASE_COCOA_VIEW_DESCRIPTION_H_
+#define UI_BASE_COCOA_VIEW_DESCRIPTION_H_
+
+#import <Cocoa/Cocoa.h>
+
+#if !NDEBUG
+
+@interface NSView (CrDebugging)
+
+// Returns a description of all the subviews and each's frame for debugging.
+- (NSString*)cr_recursiveDescription;
+
+@end
+
+#endif // !NDEBUG
+
+#endif // UI_BASE_COCOA_VIEW_DESCRIPTION_H_
diff --git a/ui/base/cocoa/view_description.mm b/ui/base/cocoa/view_description.mm
new file mode 100644
index 0000000000..1734f8817b
--- /dev/null
+++ b/ui/base/cocoa/view_description.mm
@@ -0,0 +1,31 @@
+// 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 "ui/base/cocoa/view_description.h"
+
+#if !NDEBUG
+
+@implementation NSView (CrDebugging)
+
+- (NSString*)cr_recursiveDescriptionWithPrefix:(NSString*)prefix {
+ NSString* description =
+ [NSString stringWithFormat:@"%@ <%@ %p, frame=%@, hidden=%d>\n",
+ prefix, [self class], self, NSStringFromRect([self frame]),
+ [self isHidden]];
+ prefix = [prefix stringByAppendingString:@"--"];
+
+ for (NSView* subview in [self subviews]) {
+ description = [description stringByAppendingString:
+ [subview cr_recursiveDescriptionWithPrefix:prefix]];
+ }
+ return description;
+}
+
+- (NSString*)cr_recursiveDescription {
+ return [self cr_recursiveDescriptionWithPrefix:@""];
+}
+
+@end
+
+#endif // !NDEBUG
diff --git a/ui/base/dragdrop/drag_utils.cc b/ui/base/dragdrop/drag_utils.cc
index 6431f7d0ef..e02e457e5b 100644
--- a/ui/base/dragdrop/drag_utils.cc
+++ b/ui/base/dragdrop/drag_utils.cc
@@ -6,7 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/ui/base/dragdrop/gtk_dnd_util.cc b/ui/base/dragdrop/gtk_dnd_util.cc
index 71d6923fb6..d4499dfc7b 100644
--- a/ui/base/dragdrop/gtk_dnd_util.cc
+++ b/ui/base/dragdrop/gtk_dnd_util.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "ui/base/clipboard/custom_data_helper.h"
diff --git a/ui/base/dragdrop/gtk_dnd_util_unittest.cc b/ui/base/dragdrop/gtk_dnd_util_unittest.cc
index 1142fcf07c..4587f5a033 100644
--- a/ui/base/dragdrop/gtk_dnd_util_unittest.cc
+++ b/ui/base/dragdrop/gtk_dnd_util_unittest.cc
@@ -6,7 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.cc b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
index 8760563dcd..88f320277d 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
@@ -5,7 +5,7 @@
#include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "net/base/net_util.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
index 3b073cf000..cab984eaf3 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/message_pump_aurax11.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "net/base/net_util.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index bf66958674..075cb3d539 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -12,7 +12,7 @@
#include "base/logging.h"
#include "base/memory/scoped_handle.h"
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
#include "googleurl/src/gurl.h"
#include "grit/ui_strings.h"
diff --git a/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
index 84d6757f8c..2474357fcf 100644
--- a/ui/base/dragdrop/os_exchange_data_win_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
@@ -6,7 +6,7 @@
#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index 495ad76479..c341fbd542 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -550,6 +550,9 @@ uint16 KeyEvent::GetUnmodifiedCharacter() const {
copy.state &= ~kIgnoredModifiers;
uint16 ch = GetCharacterFromXEvent(reinterpret_cast<XEvent*>(&copy));
return ch ? ch : GetCharacterFromKeyCode(key_code_, flags() & EF_SHIFT_DOWN);
+#elif defined(USE_OZONE)
+ return is_char() ? key_code_ : GetCharacterFromKeyCode(
+ key_code_, flags() & EF_SHIFT_DOWN);
#else
NOTIMPLEMENTED();
return 0;
diff --git a/ui/base/events/event.h b/ui/base/events/event.h
index fe746c0b0d..5e16d772e3 100644
--- a/ui/base/events/event.h
+++ b/ui/base/events/event.h
@@ -422,6 +422,7 @@ class UI_EXPORT MouseWheelEvent : public MouseEvent {
// Note: x_offset() > 0/y_offset() > 0 means scroll left/up.
int x_offset() const { return offset_.x(); }
int y_offset() const { return offset_.y(); }
+ const gfx::Vector2d& offset() const { return offset_; }
private:
gfx::Vector2d offset_;
diff --git a/ui/base/gtk/gtk_im_context_util.cc b/ui/base/gtk/gtk_im_context_util.cc
index 1e90729e7d..ab55ed8281 100644
--- a/ui/base/gtk/gtk_im_context_util.cc
+++ b/ui/base/gtk/gtk_im_context_util.cc
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/i18n/char_iterator.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/ime/composition_text.h"
namespace ui {
diff --git a/ui/base/ime/character_composer.cc b/ui/base/ime/character_composer.cc
index f47d34e874..18b6b013f2 100644
--- a/ui/base/ime/character_composer.cc
+++ b/ui/base/ime/character_composer.cc
@@ -9,8 +9,8 @@
#include <algorithm>
#include <iterator>
+#include "base/strings/utf_string_conversions.h"
#include "base/third_party/icu/icu_utf.h"
-#include "base/utf_string_conversions.h"
// Note for Gtk removal: gdkkeysyms.h only contains a set of
// '#define GDK_KeyName 0xNNNN' macros and does not #include any Gtk headers.
#include "third_party/gtk+/gdk/gdkkeysyms.h"
diff --git a/ui/base/ime/character_composer_unittest.cc b/ui/base/ime/character_composer_unittest.cc
index e12a121fe4..cd81a3dd52 100644
--- a/ui/base/ime/character_composer_unittest.cc
+++ b/ui/base/ime/character_composer_unittest.cc
@@ -4,7 +4,7 @@
#include "ui/base/ime/character_composer.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/gtk+/gdk/gdkkeysyms.h"
#include "ui/base/events/event_constants.h"
diff --git a/ui/base/ime/input_method_ibus.cc b/ui/base/ime/input_method_ibus.cc
index bf467d92ff..653b35f25c 100644
--- a/ui/base/ime/input_method_ibus.cc
+++ b/ui/base/ime/input_method_ibus.cc
@@ -21,8 +21,8 @@
#include "base/i18n/char_iterator.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/third_party/icu/icu_utf.h"
-#include "base/utf_string_conversions.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/ibus/ibus_client.h"
#include "chromeos/dbus/ibus/ibus_input_context_client.h"
@@ -149,9 +149,22 @@ void InputMethodIBus::ProcessKeyEventDone(uint32 id,
if (it == pending_key_events_.end())
return; // Abandoned key event.
+
+ if (event->type == KeyPress) {
+ if (is_handled) {
+ // IME event has a priority to be handled, so that character composer
+ // should be reset.
+ character_composer_.Reset();
+ } else {
+ // If IME does not handle key event, passes keyevent to character composer
+ // to be able to compose complex characters.
+ is_handled = ExecuteCharacterComposer(ibus_keyval, ibus_keycode,
+ ibus_state);
+ }
+ }
+
if (event->type == KeyPress || event->type == KeyRelease)
- ProcessKeyEventPostIME(event, ibus_keyval, ibus_keycode, ibus_state,
- is_handled);
+ ProcessKeyEventPostIME(event, ibus_state, is_handled);
// Do not use |it| for erasing, ProcessKeyEventPostIME may change the
// |pending_key_events_|.
@@ -179,11 +192,17 @@ bool InputMethodIBus::DispatchKeyEvent(const base::NativeEvent& native_event) {
GetTextInputType() == TEXT_INPUT_TYPE_PASSWORD ||
!GetInputContextClient() ||
GetInputContextClient()->IsXKBLayout()) {
- if (native_event->type == KeyPress)
- ProcessUnfilteredKeyPressEvent(native_event,
- ibus_keyval, ibus_keycode, ibus_state);
- else
+ if (native_event->type == KeyPress) {
+ if (ExecuteCharacterComposer(ibus_keyval, ibus_keycode, ibus_state)) {
+ // Treating as PostIME event if character composer handles key event and
+ // generates some IME event,
+ ProcessKeyEventPostIME(native_event, ibus_state, true);
+ return true;
+ }
+ ProcessUnfilteredKeyPressEvent(native_event, ibus_state);
+ } else {
DispatchKeyEventPostIME(native_event);
+ }
return true;
}
@@ -220,7 +239,7 @@ bool InputMethodIBus::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) {
// TODO(bryeung): The fabricated events should also pass through IME.
if (event.type() == ET_KEY_PRESSED) {
ProcessUnfilteredFabricatedKeyPressEvent(
- ET_KEY_PRESSED, event.key_code(), event.flags(), 0, 0);
+ ET_KEY_PRESSED, event.key_code(), event.flags());
} else {
DispatchFabricatedKeyEventPostIME(
ET_KEY_RELEASED,
@@ -460,8 +479,6 @@ void InputMethodIBus::UpdateContextFocusState() {
void InputMethodIBus::ProcessKeyEventPostIME(
const base::NativeEvent& native_event,
- uint32 ibus_keyval,
- uint32 ibus_keycode,
uint32 ibus_state,
bool handled) {
TextInputClient* client = GetTextInputClient();
@@ -490,8 +507,7 @@ void InputMethodIBus::ProcessKeyEventPostIME(
return;
if (native_event->type == KeyPress && !handled)
- ProcessUnfilteredKeyPressEvent(native_event,
- ibus_keyval, ibus_keycode, ibus_state);
+ ProcessUnfilteredKeyPressEvent(native_event, ibus_state);
else if (native_event->type == KeyRelease)
DispatchKeyEventPostIME(native_event);
}
@@ -528,8 +544,6 @@ void InputMethodIBus::ProcessFilteredKeyPressEvent(
void InputMethodIBus::ProcessUnfilteredKeyPressEvent(
const base::NativeEvent& native_event,
- uint32 ibus_keyval,
- uint32 ibus_keycode,
uint32 ibus_state) {
// For a fabricated event, ProcessUnfilteredFabricatedKeyPressEvent should be
// called instead.
@@ -550,11 +564,6 @@ void InputMethodIBus::ProcessUnfilteredKeyPressEvent(
const uint32 event_flags = EventFlagsFromXState(ibus_state);
- // Process compose and dead keys
- if (ProcessUnfilteredKeyPressEventWithCharacterComposer(
- ibus_keyval, ibus_keycode, event_flags))
- return;
-
// If a key event was not filtered by |context_| and |character_composer_|,
// then it means the key event didn't generate any result text. So we need
// to send corresponding character to the focused text input client.
@@ -575,59 +584,19 @@ void InputMethodIBus::ProcessUnfilteredKeyPressEvent(
void InputMethodIBus::ProcessUnfilteredFabricatedKeyPressEvent(
EventType type,
KeyboardCode key_code,
- int event_flags,
- uint32 ibus_keyval,
- uint32 ibus_keycode) {
+ int event_flags) {
TextInputClient* client = GetTextInputClient();
DispatchFabricatedKeyEventPostIME(type, key_code, event_flags);
if (client != GetTextInputClient())
return;
- if (ProcessUnfilteredKeyPressEventWithCharacterComposer(
- ibus_keyval, ibus_keycode, event_flags))
- return;
-
client = GetTextInputClient();
const uint16 ch = ui::GetCharacterFromKeyCode(key_code, event_flags);
if (client && ch)
client->InsertChar(ch, event_flags);
}
-bool InputMethodIBus::ProcessUnfilteredKeyPressEventWithCharacterComposer(
- uint32 ibus_keyval,
- uint32 ibus_keycode,
- int event_flags) {
- // We don't filter key presses for inappropriate input types.
- const TextInputType text_input_type = GetTextInputType();
- if (text_input_type == TEXT_INPUT_TYPE_NONE ||
- text_input_type == TEXT_INPUT_TYPE_PASSWORD)
- return false;
-
- // Do nothing if the key press is not filtered by our composer.
- if (!character_composer_.FilterKeyPress(ibus_keyval, ibus_keycode,
- event_flags))
- return false;
-
- TextInputClient* client = GetTextInputClient();
- if (!client) // Do nothing if we cannot get the client.
- return true;
-
- // Insert composed character.
- const string16 composed = character_composer_.composed_character();
- if (!composed.empty()) {
- if (composed.size() == 1) {
- client->InsertChar(composed[0], event_flags);
- } else {
- CompositionText composition;
- composition.text = composed;
- client->SetCompositionText(composition);
- client->ConfirmCompositionText();
- }
- }
- return true;
-}
-
void InputMethodIBus::ProcessInputMethodResult(
const base::NativeEvent& native_event,
bool handled) {
@@ -728,8 +697,8 @@ void InputMethodIBus::ForwardKeyEvent(uint32 keyval,
// calling ProcessKeyEventPostIME(), which will clear pending input method
// results.
if (event_type == ET_KEY_PRESSED) {
- ProcessUnfilteredFabricatedKeyPressEvent(
- event_type, ui_key_code, event_flags, keyval, keycode);
+ ProcessUnfilteredFabricatedKeyPressEvent(event_type, ui_key_code,
+ event_flags);
} else {
DispatchFabricatedKeyEventPostIME(event_type, ui_key_code, event_flags);
}
@@ -748,9 +717,6 @@ void InputMethodIBus::UpdatePreeditText(const chromeos::IBusText& text,
if (suppress_next_result_ || IsTextInputTypeNone())
return;
- // Preedit update means there is a working IME, discard our composer's state.
- character_composer_.Reset();
-
// |visible| argument is very confusing. For example, what's the correct
// behavior when:
// 1. OnUpdatePreeditText() is called with a text and visible == false, then
@@ -872,6 +838,30 @@ bool InputMethodIBus::IsContextReady() {
return GetInputContextClient()->IsObjectProxyReady();
}
+bool InputMethodIBus::ExecuteCharacterComposer(uint32 ibus_keyval,
+ uint32 ibus_keycode,
+ uint32 ibus_state) {
+ if (!character_composer_.FilterKeyPress(ibus_keyval,
+ ibus_keycode,
+ EventFlagsFromXState(ibus_state))) {
+ return false;
+ }
+ suppress_next_result_ = false;
+ chromeos::IBusText preedit;
+ preedit.set_text(
+ UTF16ToUTF8(character_composer_.preedit_string()));
+ UpdatePreeditText(preedit, preedit.text().size(),
+ !preedit.text().empty());
+ std::string commit_text =
+ UTF16ToUTF8(character_composer_.composed_character());
+ if (!commit_text.empty()) {
+ chromeos::IBusText ibus_text;
+ ibus_text.set_text(commit_text);
+ CommitText(ibus_text);
+ }
+ return true;
+}
+
void InputMethodIBus::OnConnected() {
DCHECK(IsConnected());
// If already input context is initialized, do nothing.
diff --git a/ui/base/ime/input_method_ibus.h b/ui/base/ime/input_method_ibus.h
index 7f480f009b..233101f5b7 100644
--- a/ui/base/ime/input_method_ibus.h
+++ b/ui/base/ime/input_method_ibus.h
@@ -64,8 +64,6 @@ class UI_EXPORT InputMethodIBus
// Process a key returned from the input method.
virtual void ProcessKeyEventPostIME(const base::NativeEvent& native_key_event,
- uint32 ibus_keyval,
- uint32 ibus_keycode,
uint32 ibus_state,
bool handled);
@@ -119,20 +117,10 @@ class UI_EXPORT InputMethodIBus
// Processes a key event that was not filtered by the input method.
void ProcessUnfilteredKeyPressEvent(const base::NativeEvent& native_key_event,
- uint32 ibus_keyval,
- uint32 ibus_keycode,
uint32 ibus_state);
void ProcessUnfilteredFabricatedKeyPressEvent(EventType type,
KeyboardCode key_code,
- int event_flags,
- uint32 ibus_keyval,
- uint32 ibus_keycode);
-
- // Processes an unfiltered key press event with character composer.
- // This method returns true if the key press is filtered by the composer.
- bool ProcessUnfilteredKeyPressEventWithCharacterComposer(uint32 ibus_keyval,
- uint32 ibus_keycode,
- int event_flags);
+ int event_flags);
// Sends input method result caused by the given key event to the focused text
// input client.
@@ -164,6 +152,12 @@ class UI_EXPORT InputMethodIBus
// Returns true if the input context is ready to use.
bool IsContextReady();
+ // Passes keyevent and executes character composition if necessary. Returns
+ // true if character composer comsumes key event.
+ bool ExecuteCharacterComposer(uint32 ibus_keyval,
+ uint32 ibus_keycode,
+ uint32 ibus_state);
+
// chromeos::IBusInputContextHandlerInterface overrides:
virtual void CommitText(const chromeos::IBusText& text) OVERRIDE;
virtual void ForwardKeyEvent(uint32 keyval,
diff --git a/ui/base/ime/input_method_ibus_unittest.cc b/ui/base/ime/input_method_ibus_unittest.cc
index 1b69ef5dc5..bd84738eb0 100644
--- a/ui/base/ime/input_method_ibus_unittest.cc
+++ b/ui/base/ime/input_method_ibus_unittest.cc
@@ -12,7 +12,7 @@
#include "base/i18n/char_iterator.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/ibus/ibus_text.h"
#include "chromeos/dbus/ibus/mock_ibus_client.h"
@@ -74,11 +74,10 @@ class TestableInputMethodIBus : public InputMethodIBus {
}
struct ProcessKeyEventPostIMEArgs {
- ProcessKeyEventPostIMEArgs() : ibus_keyval(0), handled(false) {
+ ProcessKeyEventPostIMEArgs() : handled(false) {
std::memset(&event, 0, sizeof(XEvent));
}
XEvent event;
- uint32 ibus_keyval;
bool handled;
};
@@ -91,12 +90,9 @@ class TestableInputMethodIBus : public InputMethodIBus {
// InputMethodIBus override.
virtual void ProcessKeyEventPostIME(const base::NativeEvent& native_key_event,
- uint32 ibus_keyval,
- uint32 ibus_keycode,
uint32 ibus_state,
bool handled) OVERRIDE {
process_key_event_post_ime_args_.event = *native_key_event;
- process_key_event_post_ime_args_.ibus_keyval = ibus_keyval;
process_key_event_post_ime_args_.handled = handled;
++process_key_event_post_ime_call_count_;
}
@@ -400,6 +396,9 @@ class InputMethodIBusTest : public internal::InputMethodDelegate,
inserted_char_ = ch;
inserted_char_flags_ = flags;
}
+ virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE {
+ return static_cast<gfx::NativeWindow>(NULL);
+ }
virtual TextInputType GetTextInputType() const OVERRIDE {
return input_type_;
}
@@ -1284,8 +1283,6 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventConsumeTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1320,8 +1317,6 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventNotConsumeTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1355,8 +1350,6 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventFailTest) {
EXPECT_EQ(1,
mock_ibus_input_context_client_->process_key_event_call_count());
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
// If some error is happend, key should not be consumed.
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1398,8 +1391,6 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventDelayResponseSuccessTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1439,8 +1430,6 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventDelayResponseFailTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1500,8 +1489,6 @@ TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseSuccessTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled);
// Do callback for second key event.
@@ -1511,8 +1498,6 @@ TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseSuccessTest) {
EXPECT_EQ(2, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal2,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1572,8 +1557,6 @@ TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseFailTest) {
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
// Do callback for second key event.
@@ -1583,8 +1566,6 @@ TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseFailTest) {
EXPECT_EQ(2, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal2,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
}
@@ -1663,8 +1644,6 @@ TEST_F(InputMethodIBusKeyEventTest,
EXPECT_EQ(1, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal1,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled);
// Do callback for second key event.
@@ -1674,8 +1653,6 @@ TEST_F(InputMethodIBusKeyEventTest,
EXPECT_EQ(2, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal2,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled);
// Do callback for first key event.
@@ -1685,8 +1662,6 @@ TEST_F(InputMethodIBusKeyEventTest,
EXPECT_EQ(3, ime_->process_key_event_post_ime_call_count());
EXPECT_TRUE(IsEqualXKeyEvent(event,
ime_->process_key_event_post_ime_args().event));
- EXPECT_EQ(kTestIBusKeyVal3,
- ime_->process_key_event_post_ime_args().ibus_keyval);
EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled);
}
diff --git a/ui/base/ime/text_input_client.h b/ui/base/ime/text_input_client.h
index 3edb081839..bd03b656b7 100644
--- a/ui/base/ime/text_input_client.h
+++ b/ui/base/ime/text_input_client.h
@@ -12,6 +12,7 @@
#include "ui/base/ime/text_input_type.h"
#include "ui/base/range/range.h"
#include "ui/base/ui_export.h"
+#include "ui/gfx/native_widget_types.h"
namespace gfx {
class Rect;
@@ -55,6 +56,9 @@ class UI_EXPORT TextInputClient {
// Input context information -------------------------------------------------
+ // Returns native window to which input context is bound.
+ virtual gfx::NativeWindow GetAttachedWindow() const = 0;
+
// Returns current text input type. It could be changed and even becomes
// TEXT_INPUT_TYPE_NONE at runtime.
virtual ui::TextInputType GetTextInputType() const = 0;
diff --git a/ui/base/ime/win/mock_tsf_bridge.cc b/ui/base/ime/win/mock_tsf_bridge.cc
index c71eb074cd..c28691440c 100644
--- a/ui/base/ime/win/mock_tsf_bridge.cc
+++ b/ui/base/ime/win/mock_tsf_bridge.cc
@@ -10,10 +10,10 @@
namespace ui {
MockTSFBridge::MockTSFBridge()
- : shutdown_call_count_(0),
- enable_ime_call_count_(0),
+ : enable_ime_call_count_(0),
disalbe_ime_call_count_(0),
cancel_composition_call_count_(0),
+ on_text_layout_changed_(0),
associate_focus_call_count_(0),
set_focused_client_call_count_(0),
remove_focused_client_call_count_(0),
@@ -25,10 +25,6 @@ MockTSFBridge::MockTSFBridge()
MockTSFBridge::~MockTSFBridge() {
}
-void MockTSFBridge::Shutdown() {
- shutdown_call_count_++;
-}
-
bool MockTSFBridge::CancelComposition() {
++cancel_composition_call_count_;
return true;
@@ -38,6 +34,10 @@ void MockTSFBridge::OnTextInputTypeChanged(TextInputClient* client) {
latest_text_input_type_ = client->GetTextInputType();
}
+void MockTSFBridge::OnTextLayoutChanged() {
+ ++on_text_layout_changed_;
+}
+
void MockTSFBridge::SetFocusedClient(HWND focused_window,
TextInputClient* client) {
++set_focused_client_call_count_;
@@ -61,10 +61,10 @@ TextInputClient* MockTSFBridge::GetFocusedTextInputClient() const {
}
void MockTSFBridge::Reset() {
- shutdown_call_count_ = 0;
enable_ime_call_count_ = 0;
disalbe_ime_call_count_ = 0;
cancel_composition_call_count_ = 0;
+ on_text_layout_changed_ = 0;
associate_focus_call_count_ = 0;
set_focused_client_call_count_ = 0;
remove_focused_client_call_count_ = 0;
diff --git a/ui/base/ime/win/mock_tsf_bridge.h b/ui/base/ime/win/mock_tsf_bridge.h
index a47b816050..f326178e43 100644
--- a/ui/base/ime/win/mock_tsf_bridge.h
+++ b/ui/base/ime/win/mock_tsf_bridge.h
@@ -20,9 +20,9 @@ class MockTSFBridge : public TSFBridge {
virtual ~MockTSFBridge();
// TSFBridge:
- virtual void Shutdown() OVERRIDE;
virtual bool CancelComposition() OVERRIDE;
virtual void OnTextInputTypeChanged(TextInputClient* client) OVERRIDE;
+ virtual void OnTextLayoutChanged() OVERRIDE;
virtual void SetFocusedClient(HWND focused_window,
TextInputClient* client) OVERRIDE;
virtual void RemoveFocusedClient(TextInputClient* client) OVERRIDE;
@@ -32,9 +32,6 @@ class MockTSFBridge : public TSFBridge {
// Resets MockTSFBridge state including function call counter.
void Reset();
- // Call count of Shutdown().
- int shutdown_call_count() const { return shutdown_call_count_; }
-
// Call count of EnableIME().
int enable_ime_call_count() const { return enable_ime_call_count_; }
@@ -46,6 +43,11 @@ class MockTSFBridge : public TSFBridge {
return cancel_composition_call_count_;
}
+ // Call count of OnTextLayoutChanged().
+ int on_text_layout_changed() const {
+ return on_text_layout_changed_;
+ }
+
// Call count of AssociateFocus().
int associate_focus_call_count() const { return associate_focus_call_count_; }
@@ -54,7 +56,7 @@ class MockTSFBridge : public TSFBridge {
return set_focused_client_call_count_;
}
- // Call count of Shutdown().
+ // Call count of RemoveFocusedClient().
int remove_focused_client_call_count() const {
return remove_focused_client_call_count_;
}
@@ -71,10 +73,10 @@ class MockTSFBridge : public TSFBridge {
}
private:
- int shutdown_call_count_;
int enable_ime_call_count_;
int disalbe_ime_call_count_;
int cancel_composition_call_count_;
+ int on_text_layout_changed_;
int associate_focus_call_count_;
int set_focused_client_call_count_;
int remove_focused_client_call_count_;
diff --git a/ui/base/ime/win/tsf_bridge.cc b/ui/base/ime/win/tsf_bridge.cc
index c60cc6c401..4e70f2f65f 100644
--- a/ui/base/ime/win/tsf_bridge.cc
+++ b/ui/base/ime/win/tsf_bridge.cc
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/singleton.h"
#include "base/message_loop.h"
#include "base/threading/thread_local_storage.h"
#include "base/win/scoped_comptr.h"
@@ -37,8 +36,8 @@ class TSFBridgeDelegate : public TSFBridge {
bool Initialize();
// TsfBridge:
- virtual void Shutdown() OVERRIDE;
virtual void OnTextInputTypeChanged(TextInputClient* client) OVERRIDE;
+ virtual void OnTextLayoutChanged() OVERRIDE;
virtual bool CancelComposition() OVERRIDE;
virtual void SetFocusedClient(HWND focused_window,
TextInputClient* client) OVERRIDE;
@@ -47,8 +46,6 @@ class TSFBridgeDelegate : public TSFBridge {
virtual TextInputClient* GetFocusedTextInputClient() const OVERRIDE;
private:
- friend struct DefaultSingletonTraits<TSFBridgeDelegate>;
-
// Returns true if |tsf_document_map_| is successfully initialized. This
// method should be called from and only from Initialize().
bool InitializeDocumentMapInternal();
@@ -74,13 +71,6 @@ class TSFBridgeDelegate : public TSFBridge {
// Returns true if already initialized.
bool IsInitialized();
- // Returns an instance of ITfDocumentMgr that is associated with the
- // current TextInputType of |client_|.
- base::win::ScopedComPtr<ITfDocumentMgr> GetAssociatedDocumentManager();
-
- // An ITfThreadMgr object to be used in focus and document management.
- base::win::ScopedComPtr<ITfThreadMgr> thread_manager_;
-
// A triple of document manager, text store and binding cookie between
// a context owned by the document manager and the text store. This is a
// minimum working set of an editable document in TSF.
@@ -95,6 +85,13 @@ class TSFBridgeDelegate : public TSFBridge {
DWORD cookie;
};
+ // Returns a pointer to TSFDocument that is associated with the current
+ // TextInputType of |client_|.
+ TSFDocument* GetAssociatedDocument();
+
+ // An ITfThreadMgr object to be used in focus and document management.
+ base::win::ScopedComPtr<ITfThreadMgr> thread_manager_;
+
// A map from TextInputType to an editable document for TSF. We use multiple
// TSF documents that have different InputScopes and TSF attributes based on
// the TextInputType associated with the target document. For a TextInputType
@@ -121,6 +118,22 @@ TSFBridgeDelegate::TSFBridgeDelegate()
}
TSFBridgeDelegate::~TSFBridgeDelegate() {
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
+ if (!IsInitialized())
+ return;
+ for (TSFDocumentMap::iterator it = tsf_document_map_.begin();
+ it != tsf_document_map_.end(); ++it) {
+ base::win::ScopedComPtr<ITfContext> context;
+ base::win::ScopedComPtr<ITfSource> source;
+ if (it->second.cookie != TF_INVALID_COOKIE &&
+ SUCCEEDED(it->second.document_manager->GetBase(context.Receive())) &&
+ SUCCEEDED(source.QueryFrom(context))) {
+ source->UnadviseSink(it->second.cookie);
+ }
+ }
+ tsf_document_map_.clear();
+
+ client_id_ = TF_CLIENTID_NULL;
}
bool TSFBridgeDelegate::Initialize() {
@@ -171,25 +184,6 @@ bool TSFBridgeDelegate::Initialize() {
return true;
}
-void TSFBridgeDelegate::Shutdown() {
- DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
- if (!IsInitialized())
- return;
- for (TSFDocumentMap::iterator it = tsf_document_map_.begin();
- it != tsf_document_map_.end(); ++it) {
- base::win::ScopedComPtr<ITfContext> context;
- base::win::ScopedComPtr<ITfSource> source;
- if (it->second.cookie != TF_INVALID_COOKIE &&
- SUCCEEDED(it->second.document_manager->GetBase(context.Receive())) &&
- SUCCEEDED(source.QueryFrom(context))) {
- source->UnadviseSink(it->second.cookie);
- }
- }
- tsf_document_map_.clear();
-
- client_id_ = TF_CLIENTID_NULL;
-}
-
void TSFBridgeDelegate::OnTextInputTypeChanged(TextInputClient* client) {
DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
DCHECK(IsInitialized());
@@ -199,7 +193,20 @@ void TSFBridgeDelegate::OnTextInputTypeChanged(TextInputClient* client) {
return;
}
- thread_manager_->SetFocus(GetAssociatedDocumentManager().get());
+ TSFDocument* document = GetAssociatedDocument();
+ if (!document)
+ return;
+ thread_manager_->SetFocus(document->document_manager.get());
+ OnTextLayoutChanged();
+}
+
+void TSFBridgeDelegate::OnTextLayoutChanged() {
+ TSFDocument* document = GetAssociatedDocument();
+ if (!document)
+ return;
+ if (!document->text_store)
+ return;
+ document->text_store->SendOnLayoutChange();
}
bool TSFBridgeDelegate::CancelComposition() {
@@ -417,13 +424,14 @@ bool TSFBridgeDelegate::IsInitialized() {
return client_id_ != TF_CLIENTID_NULL;
}
-base::win::ScopedComPtr<ITfDocumentMgr>
-TSFBridgeDelegate::GetAssociatedDocumentManager() {
- TSFDocumentMap::const_iterator it =
+TSFBridgeDelegate::TSFDocument* TSFBridgeDelegate::GetAssociatedDocument() {
+ if (!client_)
+ return NULL;
+ TSFDocumentMap::iterator it =
tsf_document_map_.find(client_->GetTextInputType());
if (it == tsf_document_map_.end())
- return tsf_document_map_[TEXT_INPUT_TYPE_TEXT].document_manager;
- return it->second.document_manager;
+ return &tsf_document_map_[TEXT_INPUT_TYPE_TEXT];
+ return &it->second;
}
} // namespace
@@ -445,11 +453,14 @@ bool TSFBridge::Initialize() {
}
if (!tls_tsf_bridge.initialized()) {
tls_tsf_bridge.Initialize(TSFBridge::Finalize);
- TSFBridgeDelegate* delegate = new TSFBridgeDelegate();
- tls_tsf_bridge.Set(delegate);
- return delegate->Initialize();
}
- return true;
+ TSFBridgeDelegate* delegate =
+ static_cast<TSFBridgeDelegate*>(tls_tsf_bridge.Get());
+ if (delegate)
+ return true;
+ delegate = new TSFBridgeDelegate();
+ tls_tsf_bridge.Set(delegate);
+ return delegate->Initialize();
}
// static
@@ -464,6 +475,19 @@ TSFBridge* TSFBridge::ReplaceForTesting(TSFBridge* bridge) {
}
// static
+void TSFBridge::Shutdown() {
+ if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) {
+ DVLOG(1) << "Do not use TSFBridge without UI thread.";
+ }
+ if (tls_tsf_bridge.initialized()) {
+ TSFBridgeDelegate* delegate =
+ static_cast<TSFBridgeDelegate*>(tls_tsf_bridge.Get());
+ tls_tsf_bridge.Set(NULL);
+ delete delegate;
+ }
+}
+
+// static
TSFBridge* TSFBridge::GetInstance() {
if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) {
DVLOG(1) << "Do not use TSFBridge without UI thread.";
diff --git a/ui/base/ime/win/tsf_bridge.h b/ui/base/ime/win/tsf_bridge.h
index 74f0550263..cffde1f8bb 100644
--- a/ui/base/ime/win/tsf_bridge.h
+++ b/ui/base/ime/win/tsf_bridge.h
@@ -44,13 +44,16 @@ class UI_EXPORT TSFBridge {
static TSFBridge* ReplaceForTesting(TSFBridge* bridge);
// Destroys the thread local instance.
- virtual void Shutdown() = 0;
+ static void Shutdown();
// Handles TextInputTypeChanged event. RWHVW is responsible for calling this
// handler whenever renderer's input text type is changed. Does nothing
// unless |client| is focused.
virtual void OnTextInputTypeChanged(TextInputClient* client) = 0;
+ // Sends an event to TSF manager that the text layout should be updated.
+ virtual void OnTextLayoutChanged() = 0;
+
// Cancels the ongoing composition if exists.
// Returns false if an error occures.
virtual bool CancelComposition() = 0;
diff --git a/ui/base/ime/win/tsf_text_store_unittest.cc b/ui/base/ime/win/tsf_text_store_unittest.cc
index 11e2737b84..baa4c8d982 100644
--- a/ui/base/ime/win/tsf_text_store_unittest.cc
+++ b/ui/base/ime/win/tsf_text_store_unittest.cc
@@ -26,6 +26,7 @@ class MockTextInputClient : public TextInputClient {
MOCK_METHOD0(ClearCompositionText, void());
MOCK_METHOD1(InsertText, void(const string16&));
MOCK_METHOD2(InsertChar, void(char16, int));
+ MOCK_CONST_METHOD0(GetAttachedWindow, gfx::NativeWindow());
MOCK_CONST_METHOD0(GetTextInputType, ui::TextInputType());
MOCK_CONST_METHOD0(CanComposeInline, bool());
MOCK_METHOD0(GetCaretBounds, gfx::Rect());
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.cc b/ui/base/keycodes/keyboard_code_conversion_x.cc
index 7b752332c5..8600ea086c 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/base/keycodes/keyboard_code_conversion_x.cc
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
namespace ui {
@@ -339,6 +339,10 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
case XK_guillemotleft:
case XK_guillemotright:
case XK_degree:
+ // In the case of canadian multilingual keyboard layout, VKEY_OEM_102 is
+ // assigned to ugrave key.
+ case XK_ugrave:
+ case XK_Ugrave:
return VKEY_OEM_102; // international backslash key in 102 keyboard.
// When evdev is in use, /usr/share/X11/xkb/symbols/inet maps F13-18 keys
diff --git a/ui/base/l10n/l10n_font_util.cc b/ui/base/l10n/l10n_font_util.cc
index 63d58e0303..19f0e2f47e 100644
--- a/ui/base/l10n/l10n_font_util.cc
+++ b/ui/base/l10n/l10n_font_util.cc
@@ -7,7 +7,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/font.h"
namespace ui {
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc
index 704696934c..ad7a6bd5a7 100644
--- a/ui/base/l10n/l10n_util.cc
+++ b/ui/base/l10n/l10n_util.cc
@@ -23,7 +23,7 @@
#include "base/stringprintf.h"
#include "base/strings/string_split.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "third_party/icu/public/common/unicode/rbbi.h"
#include "third_party/icu/public/common/unicode/uloc.h"
diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc
index 1fce2e21bd..627c088beb 100644
--- a/ui/base/l10n/l10n_util_unittest.cc
+++ b/ui/base/l10n/l10n_util_unittest.cc
@@ -16,8 +16,8 @@
#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_path_override.h"
-#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "third_party/icu/public/common/unicode/locid.h"
diff --git a/ui/base/latency_info.cc b/ui/base/latency_info.cc
index 2d375854c6..eb8b34ca0c 100644
--- a/ui/base/latency_info.cc
+++ b/ui/base/latency_info.cc
@@ -30,7 +30,7 @@ void LatencyInfo::AddLatencyNumber(LatencyComponentType component,
int64 id,
int64 component_sequence_number) {
AddLatencyNumberWithTimestamp(component, id, component_sequence_number,
- base::TimeTicks::Now(), 1);
+ base::TimeTicks::HighResNow(), 1);
}
void LatencyInfo::AddLatencyNumberWithTimestamp(LatencyComponentType component,
diff --git a/ui/base/layout_mac.mm b/ui/base/layout_mac.mm
index d799c65dc4..f1a635dfbb 100644
--- a/ui/base/layout_mac.mm
+++ b/ui/base/layout_mac.mm
@@ -6,18 +6,7 @@
#include <Cocoa/Cocoa.h>
-#if !defined(MAC_OS_X_VERSION_10_7) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-@interface NSScreen (LionAPI)
-- (CGFloat)backingScaleFactor;
-@end
-
-@interface NSWindow (LionAPI)
-- (CGFloat)backingScaleFactor;
-@end
-
-#endif // 10.7
+#include "base/mac/sdk_forward_declarations.h"
namespace {
diff --git a/ui/base/models/tree_node_model.h b/ui/base/models/tree_node_model.h
index 5bfe46e2a1..0ab6ff87ab 100644
--- a/ui/base/models/tree_node_model.h
+++ b/ui/base/models/tree_node_model.h
@@ -101,6 +101,14 @@ class TreeNode : public TreeModelNode {
children_.weak_clear();
}
+ // Removes all existing children without deleting the nodes and adds all nodes
+ // contained in |children| into this node as children.
+ void SetChildren(const std::vector<NodeType*>& children) {
+ RemoveAll();
+ for (size_t i = 0; i < children.size(); ++i)
+ Add(children[i], i);
+ }
+
// Returns the parent node, or NULL if this is the root node.
const NodeType* parent() const { return parent_; }
NodeType* parent() { return parent_; }
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc
index 2d313d9b1d..c8555a6e7c 100644
--- a/ui/base/models/tree_node_model_unittest.cc
+++ b/ui/base/models/tree_node_model_unittest.cc
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace ui {
diff --git a/ui/base/ozone/event_converter_ozone.cc b/ui/base/ozone/event_converter_ozone.cc
new file mode 100644
index 0000000000..0be50362d2
--- /dev/null
+++ b/ui/base/ozone/event_converter_ozone.cc
@@ -0,0 +1,33 @@
+// 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 "ui/base/ozone/event_converter_ozone.h"
+
+#include "base/bind.h"
+#include "base/message_loop.h"
+#include "base/message_pump_ozone.h"
+#include "ui/base/events/event.h"
+
+namespace {
+
+void DispatchEventHelper(scoped_ptr<ui::Event> key) {
+ base::MessagePumpOzone::Current()->Dispatch(key.get());
+}
+
+} // namespace
+
+namespace ui {
+
+EventConverterOzone::EventConverterOzone() {
+}
+
+EventConverterOzone::~EventConverterOzone() {
+}
+
+void EventConverterOzone::DispatchEvent(scoped_ptr<ui::Event> event) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&DispatchEventHelper, base::Passed(&event)));
+}
+
+} // namespace ui
diff --git a/ui/base/ozone/event_converter_ozone.h b/ui/base/ozone/event_converter_ozone.h
new file mode 100644
index 0000000000..766b1df0e0
--- /dev/null
+++ b/ui/base/ozone/event_converter_ozone.h
@@ -0,0 +1,38 @@
+// 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 UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
+#define UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "base/message_pump_libevent.h"
+
+namespace ui {
+class Event;
+
+// In ozone, Chrome reads events from file descriptors created from Linux device
+// drivers. The |MessagePumpLibevent::Watcher| parent class provides the
+// functionality to watch a file descriptor for the arrival of new data and
+// notify its subclasses. Device-specific event converters turn bytes read from
+// the file descriptor into |ui::Event| instances. This class provides the
+// functionality needed in common across all converters: dispatching the
+// |ui::Event| to aura.
+class EventConverterOzone : public base::MessagePumpLibevent::Watcher {
+ public:
+ EventConverterOzone();
+ virtual ~EventConverterOzone();
+
+ protected:
+ // Subclasses should use this method to post a task that will dispatch
+ // |event| from the UI message loop. This method takes ownership of
+ // |event|. |event| will be deleted at the end of the posted task.
+ void DispatchEvent(scoped_ptr<ui::Event> event);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(EventConverterOzone);
+};
+
+} // namespace ui
+
+#endif // UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
diff --git a/ui/base/ozone/event_factory_ozone.cc b/ui/base/ozone/event_factory_ozone.cc
new file mode 100644
index 0000000000..3189f1dd7d
--- /dev/null
+++ b/ui/base/ozone/event_factory_ozone.cc
@@ -0,0 +1,66 @@
+// 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 "ui/base/ozone/event_factory_ozone.h"
+
+#include <fcntl.h>
+#include <linux/input.h>
+#include <poll.h>
+#include <unistd.h>
+
+#include "base/message_pump_ozone.h"
+#include "base/stringprintf.h"
+#include "ui/base/ozone/key_event_converter_ozone.h"
+#include "ui/base/ozone/touch_event_converter_ozone.h"
+
+namespace ui {
+
+EventFactoryOzone::EventFactoryOzone() {}
+
+EventFactoryOzone::~EventFactoryOzone() {
+ for (unsigned i = 0; i < fd_controllers_.size(); i++) {
+ fd_controllers_[i]->StopWatchingFileDescriptor();
+ }
+}
+
+void EventFactoryOzone::CreateEvdevWatchers() {
+ // The number of devices in the directory is unknown without reading
+ // the contents of the directory. Further, with hot-plugging, the entries
+ // might decrease during the execution of this loop. So exciting from the
+ // loop on the first failure of open below is both cheaper and more
+ // reliable.
+ for (int id = 0; true; id++) {
+ std::string path = base::StringPrintf("/dev/input/event%d", id);
+ int fd = open(path.c_str(), O_RDONLY | O_NONBLOCK);
+ if (fd < 0)
+ break;
+ size_t evtype = 0;
+ COMPILE_ASSERT(sizeof(evtype) * 8 >= EV_MAX, evtype_wide_enough);
+ if (ioctl(fd, EVIOCGBIT(0, sizeof(evtype)), &evtype) == -1) {
+ DLOG(ERROR) << "failed ioctl EVIOCGBIT 0" << path;
+ close(fd);
+ continue;
+ }
+
+ EventConverterOzone* watcher = NULL;
+ // TODO(rjkroege) Add more device types. Support hot-plugging.
+ if (evtype & (1 << EV_ABS))
+ watcher = new TouchEventConverterOzone(fd, id);
+ else if (evtype & (1 << EV_KEY))
+ watcher = new KeyEventConverterOzone();
+
+ if (watcher) {
+ base::MessagePumpLibevent::FileDescriptorWatcher* controller =
+ new base::MessagePumpLibevent::FileDescriptorWatcher();
+ base::MessagePumpOzone::Current()->WatchFileDescriptor(
+ fd, true, base::MessagePumpLibevent::WATCH_READ, controller, watcher);
+ evdev_watchers_.push_back(watcher);
+ fd_controllers_.push_back(controller);
+ } else {
+ close(fd);
+ }
+ }
+}
+
+} // namespace ui
diff --git a/ui/base/ozone/event_factory_ozone.h b/ui/base/ozone/event_factory_ozone.h
new file mode 100644
index 0000000000..adf5b81c61
--- /dev/null
+++ b/ui/base/ozone/event_factory_ozone.h
@@ -0,0 +1,35 @@
+// 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 UI_BASE_OZONE_EVENT_FACTORY_OZONE_H_
+#define UI_BASE_OZONE_EVENT_FACTORY_OZONE_H_
+
+#include "base/memory/scoped_vector.h"
+#include "base/message_pump_libevent.h"
+#include "ui/base/ozone/event_converter_ozone.h"
+#include "ui/base/ui_export.h"
+
+namespace ui {
+
+// Sets up and manages watcher instances for event sources in /dev/input/*.
+class UI_EXPORT EventFactoryOzone {
+ public:
+ EventFactoryOzone();
+ virtual ~EventFactoryOzone();
+
+ // Opens /dev/input/* event sources as appropriate and set up watchers.
+ void CreateEvdevWatchers();
+
+ private:
+ // FileDescriptorWatcher instances for each watched source of events.
+ ScopedVector<EventConverterOzone> evdev_watchers_;
+ ScopedVector<base::MessagePumpLibevent::FileDescriptorWatcher>
+ fd_controllers_;
+
+ DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone);
+};
+
+} // namespace ui
+
+#endif // UI_BASE_OZONE_EVENT_FACTORY_OZONE_H_
diff --git a/ui/base/ozone/events_ozone.cc b/ui/base/ozone/events_ozone.cc
new file mode 100644
index 0000000000..f5481ce9f7
--- /dev/null
+++ b/ui/base/ozone/events_ozone.cc
@@ -0,0 +1,154 @@
+// 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 "ui/base/events/event.h"
+#include "ui/base/events/event_constants.h"
+#include "ui/base/events/event_utils.h"
+
+namespace ui {
+
+void UpdateDeviceList() { NOTIMPLEMENTED(); }
+
+base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) {
+ const ui::Event* event = static_cast<const ui::Event*>(native_event);
+ return event->time_stamp();
+}
+
+int EventFlagsFromNative(const base::NativeEvent& native_event) {
+ const ui::Event* event = static_cast<const ui::Event*>(native_event);
+ return event->flags();
+}
+
+EventType EventTypeFromNative(const base::NativeEvent& native_event) {
+ const ui::Event* event = static_cast<const ui::Event*>(native_event);
+ return event->type();
+}
+
+gfx::Point EventSystemLocationFromNative(
+ const base::NativeEvent& native_event) {
+ const ui::LocatedEvent* e =
+ static_cast<const ui::LocatedEvent*>(native_event);
+ DCHECK(e->IsMouseEvent() || e->IsTouchEvent() || e->IsGestureEvent() ||
+ e->IsScrollEvent());
+ return e->location();
+}
+
+gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
+ return EventSystemLocationFromNative(native_event);
+}
+
+int GetChangedMouseButtonFlagsFromNative(
+ const base::NativeEvent& native_event) {
+ const ui::MouseEvent* event =
+ static_cast<const ui::MouseEvent*>(native_event);
+ DCHECK(event->IsMouseEvent());
+ return event->changed_button_flags();
+}
+
+KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
+ const ui::KeyEvent* event = static_cast<const ui::KeyEvent*>(native_event);
+ DCHECK(event->IsKeyEvent());
+ return event->key_code();
+}
+
+bool IsMouseEvent(const base::NativeEvent& native_event) {
+ const ui::Event* e = static_cast<const ui::Event*>(native_event);
+ return e->IsMouseEvent();
+}
+
+gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) {
+ const ui::MouseWheelEvent* event =
+ static_cast<const ui::MouseWheelEvent*>(native_event);
+ DCHECK(event->type() == ET_MOUSEWHEEL);
+ return event->offset();
+}
+
+int GetTouchId(const base::NativeEvent& native_event) {
+ const ui::TouchEvent* event =
+ static_cast<const ui::TouchEvent*>(native_event);
+ DCHECK(event->IsTouchEvent());
+ return event->touch_id();
+}
+
+float GetTouchRadiusX(const base::NativeEvent& native_event) {
+ const ui::TouchEvent* event =
+ static_cast<const ui::TouchEvent*>(native_event);
+ DCHECK(event->IsTouchEvent());
+ return event->radius_x();
+}
+
+float GetTouchRadiusY(const base::NativeEvent& native_event) {
+ const ui::TouchEvent* event =
+ static_cast<const ui::TouchEvent*>(native_event);
+ DCHECK(event->IsTouchEvent());
+ return event->radius_y();
+}
+
+float GetTouchAngle(const base::NativeEvent& native_event) {
+ const ui::TouchEvent* event =
+ static_cast<const ui::TouchEvent*>(native_event);
+ DCHECK(event->IsTouchEvent());
+ return event->rotation_angle();
+}
+
+float GetTouchForce(const base::NativeEvent& native_event) {
+ const ui::TouchEvent* event =
+ static_cast<const ui::TouchEvent*>(native_event);
+ DCHECK(event->IsTouchEvent());
+ return event->force();
+}
+
+bool GetScrollOffsets(const base::NativeEvent& native_event,
+ float* x_offset,
+ float* y_offset,
+ float* x_offset_ordinal,
+ float* y_offset_ordinal,
+ int* finger_count) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool GetFlingData(const base::NativeEvent& native_event,
+ float* vx,
+ float* vy,
+ float* vx_ordinal,
+ float* vy_ordinal,
+ bool* is_cancel) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool GetGestureTimes(const base::NativeEvent& native_event,
+ double* start_time,
+ double* end_time) {
+ *start_time = 0;
+ *end_time = 0;
+ return false;
+}
+
+void SetNaturalScroll(bool /* enabled */) { NOTIMPLEMENTED(); }
+
+bool IsNaturalScrollEnabled() { return false; }
+
+bool IsTouchpadEvent(const base::NativeEvent& event) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool IsNoopEvent(const base::NativeEvent& event) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+base::NativeEvent CreateNoopEvent() {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+int GetModifiersFromKeyState() {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+} // namespace ui
diff --git a/ui/base/ozone/key_event_converter_ozone.cc b/ui/base/ozone/key_event_converter_ozone.cc
new file mode 100644
index 0000000000..f4ff3db5b3
--- /dev/null
+++ b/ui/base/ozone/key_event_converter_ozone.cc
@@ -0,0 +1,64 @@
+// 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 "ui/base/ozone/key_event_converter_ozone.h"
+
+#include <linux/input.h>
+
+#include "ui/base/events/event.h"
+#include "ui/base/keycodes/keyboard_codes.h"
+
+namespace {
+
+ui::KeyboardCode KeyboardCodeFromButton(int code) {
+ switch (code) {
+ case KEY_VOLUMEDOWN:
+ return ui::VKEY_VOLUME_DOWN;
+
+ case KEY_VOLUMEUP:
+ return ui::VKEY_VOLUME_UP;
+
+ case KEY_POWER:
+ return ui::VKEY_POWER;
+ }
+
+ LOG(ERROR) << "Unknown key code: " << code;
+ return static_cast<ui::KeyboardCode>(0);
+}
+
+} // namespace
+
+namespace ui {
+
+// TODO(rjkroege): Stop leaking file descriptor.
+KeyEventConverterOzone::KeyEventConverterOzone() {}
+KeyEventConverterOzone::~KeyEventConverterOzone() {}
+
+void KeyEventConverterOzone::OnFileCanReadWithoutBlocking(int fd) {
+ input_event inputs[4];
+ ssize_t read_size = read(fd, inputs, sizeof(inputs));
+ if (read_size <= 0)
+ return;
+
+ CHECK_EQ(read_size % sizeof(*inputs), 0u);
+ for (unsigned i = 0; i < read_size / sizeof(*inputs); ++i) {
+ const input_event& input = inputs[i];
+ if (input.type == EV_KEY) {
+ scoped_ptr<KeyEvent> key(
+ new KeyEvent(input.value == 1 ? ET_KEY_PRESSED : ET_KEY_RELEASED,
+ KeyboardCodeFromButton(input.code),
+ 0,
+ true));
+ DispatchEvent(key.PassAs<ui::Event>());
+ } else if (input.type == EV_SYN) {
+ // TODO(sadrul): Handle this case appropriately.
+ }
+ }
+}
+
+void KeyEventConverterOzone::OnFileCanWriteWithoutBlocking(int fd) {
+ NOTREACHED();
+}
+
+} // namespace ui
diff --git a/ui/base/ozone/key_event_converter_ozone.h b/ui/base/ozone/key_event_converter_ozone.h
new file mode 100644
index 0000000000..29ea26ae9a
--- /dev/null
+++ b/ui/base/ozone/key_event_converter_ozone.h
@@ -0,0 +1,27 @@
+// 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 UI_BASE_OZONE_KEY_EVENT_CONVERTER_OZONE_H_
+#define UI_BASE_OZONE_KEY_EVENT_CONVERTER_OZONE_H_
+
+#include "ui/base/ozone/event_converter_ozone.h"
+
+namespace ui {
+
+class KeyEventConverterOzone : public EventConverterOzone {
+ public:
+ KeyEventConverterOzone();
+ virtual ~KeyEventConverterOzone();
+
+ private:
+ // Overidden from base::MessagePumpLibevent::Watcher.
+ virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(KeyEventConverterOzone);
+};
+
+} // namspace ui
+
+#endif // UI_BASE_OZONE_KEY_EVENT_CONVERTER_OZONE_H_
diff --git a/ui/base/ozone/surface_factory_ozone.h b/ui/base/ozone/surface_factory_ozone.h
index c9c33514b5..bd22d35b1a 100644
--- a/ui/base/ozone/surface_factory_ozone.h
+++ b/ui/base/ozone/surface_factory_ozone.h
@@ -5,7 +5,8 @@
#ifndef UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
#define UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
-#include "ui/gfx/native_widget_types.h"
+#include "ui/base/ui_export.h"
+#include "ui/gfx/native_widget_types.h"
namespace gfx {
class VSyncProvider;
@@ -19,14 +20,14 @@ class SurfaceFactoryOzone {
virtual ~SurfaceFactoryOzone();
// Returns the instance
- static SurfaceFactoryOzone* GetInstance();
+ UI_EXPORT static SurfaceFactoryOzone* GetInstance();
// Returns a display spec as in |CreateDisplayFromSpec| for the default
// native surface.
virtual const char* DefaultDisplaySpec();
// Sets the implementation delegate.
- static void SetInstance(SurfaceFactoryOzone* impl);
+ UI_EXPORT static void SetInstance(SurfaceFactoryOzone* impl);
// TODO(rjkroege): Add a status code if necessary.
// Configures the display hardware. Must be called from within the GPU
diff --git a/ui/base/ozone/touch_event_converter_ozone.cc b/ui/base/ozone/touch_event_converter_ozone.cc
new file mode 100644
index 0000000000..0784fb40b8
--- /dev/null
+++ b/ui/base/ozone/touch_event_converter_ozone.cc
@@ -0,0 +1,181 @@
+// 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 "ui/base/ozone/touch_event_converter_ozone.h"
+
+#include <fcntl.h>
+#include <linux/input.h>
+#include <poll.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <cmath>
+
+#include "base/bind.h"
+#include "base/callback.h"
+#include "base/logging.h"
+#include "base/message_loop.h"
+#include "base/message_pump_ozone.h"
+#include "ui/base/events/event.h"
+#include "ui/base/events/event_constants.h"
+#include "ui/base/ozone/surface_factory_ozone.h"
+
+namespace {
+
+// Number is determined empirically.
+// TODO(rjkroege): Configure this per device.
+const float kFingerWidth = 25.f;
+
+} // namespace
+
+namespace ui {
+
+TouchEventConverterOzone::TouchEventConverterOzone(int fd, int id)
+ : pressure_min_(0),
+ pressure_max_(0),
+ x_scale_(1.),
+ y_scale_(1.),
+ current_slot_(0),
+ fd_(fd),
+ id_(id) {
+ Init();
+}
+
+TouchEventConverterOzone::~TouchEventConverterOzone() {
+ if (close(fd_) < 0)
+ DLOG(WARNING) << "failed close on /dev/input/event" << id_;
+}
+
+void TouchEventConverterOzone::Init() {
+ input_absinfo abs = {};
+ if (ioctl(fd_, EVIOCGABS(ABS_MT_SLOT), &abs) != -1) {
+ CHECK_GE(abs.maximum, abs.minimum);
+ CHECK_GE(abs.minimum, 0);
+ } else {
+ DLOG(WARNING) << "failed ioctl EVIOCGABS ABS_MT_SLOT event" << id_;
+ }
+ if (ioctl(fd_, EVIOCGABS(ABS_MT_PRESSURE), &abs) != -1) {
+ pressure_min_ = abs.minimum;
+ pressure_max_ = abs.maximum;
+ } else {
+ DLOG(WARNING) << "failed ioctl EVIOCGABS ABS_MT_PRESSURE event" << id_;
+ }
+ int x_min = 0, x_max = 0;
+ if (ioctl(fd_, EVIOCGABS(ABS_MT_POSITION_X), &abs) != -1) {
+ x_min = abs.minimum;
+ x_max = abs.maximum;
+ } else {
+ LOG(WARNING) << "failed ioctl EVIOCGABS ABS_X event" << id_;
+ }
+ int y_min = 0, y_max = 0;
+ if (ioctl(fd_, EVIOCGABS(ABS_MT_POSITION_Y), &abs) != -1) {
+ y_min = abs.minimum;
+ y_max = abs.maximum;
+ } else {
+ LOG(WARNING) << "failed ioctl EVIOCGABS ABS_Y event" << id_;
+ }
+ if (x_max && y_max && SurfaceFactoryOzone::GetInstance()) {
+ const char* display =
+ SurfaceFactoryOzone::GetInstance()->DefaultDisplaySpec();
+ int screen_width, screen_height;
+ int sc = sscanf(display, "%dx%d", &screen_width, &screen_height);
+ if (sc == 2) {
+ x_scale_ = (double)screen_width / (x_max - x_min);
+ y_scale_ = (double)screen_height / (y_max - y_min);
+ LOG(INFO) << "touch input x_scale=" << x_scale_
+ << " y_scale=" << y_scale_;
+ } else {
+ LOG(WARNING) << "malformed display spec from "
+ << "SurfaceFactoryOzone::DefaultDisplaySpec";
+ }
+ }
+}
+
+void TouchEventConverterOzone::OnFileCanWriteWithoutBlocking(int /* fd */) {
+ // Read-only file-descriptors.
+ NOTREACHED();
+}
+
+void TouchEventConverterOzone::OnFileCanReadWithoutBlocking(int fd) {
+ input_event inputs[MAX_FINGERS * 6 + 1];
+ ssize_t read_size = read(fd, inputs, sizeof(inputs));
+ if (read_size <= 0)
+ return;
+
+ for (unsigned i = 0; i < read_size / sizeof(*inputs); i++) {
+ const input_event& input = inputs[i];
+ if (input.type == EV_ABS) {
+ switch (input.code) {
+ case ABS_MT_TOUCH_MAJOR:
+ altered_slots_.set(current_slot_);
+ events_[current_slot_].major_ = input.value;
+ break;
+ case ABS_X:
+ case ABS_MT_POSITION_X:
+ altered_slots_.set(current_slot_);
+ events_[current_slot_].x_ = roundf(input.value * x_scale_);
+ break;
+ case ABS_Y:
+ case ABS_MT_POSITION_Y:
+ altered_slots_.set(current_slot_);
+ events_[current_slot_].y_ = roundf(input.value * y_scale_);
+ break;
+ case ABS_MT_TRACKING_ID:
+ altered_slots_.set(current_slot_);
+ if (input.value < 0) {
+ events_[current_slot_].type_ = ET_TOUCH_RELEASED;
+ } else {
+ events_[current_slot_].finger_ = input.value;
+ events_[current_slot_].type_ = ET_TOUCH_PRESSED;
+ }
+ break;
+ case ABS_MT_PRESSURE:
+ case ABS_PRESSURE:
+ altered_slots_.set(current_slot_);
+ events_[current_slot_].pressure_ = input.value - pressure_min_;
+ events_[current_slot_].pressure_ /= pressure_max_ - pressure_min_;
+ break;
+ case ABS_MT_SLOT:
+ current_slot_ = input.value;
+ altered_slots_.set(current_slot_);
+ break;
+ default:
+ NOTREACHED();
+ }
+ } else if (input.type == EV_SYN) {
+ switch (input.code) {
+ case SYN_REPORT:
+ for (int j = 0; j < MAX_FINGERS; j++) {
+ if (altered_slots_[j]) {
+ // TODO(rjkroege): Support elliptical finger regions.
+ scoped_ptr<TouchEvent> tev(new TouchEvent(
+ events_[j].type_,
+ gfx::Point(events_[j].x_, events_[j].y_),
+ /* flags */ 0,
+ /* touch_id */ j,
+ base::TimeDelta::FromMicroseconds(
+ input.time.tv_sec * 1000000 + input.time.tv_usec),
+ events_[j].pressure_ * kFingerWidth,
+ events_[j].pressure_ * kFingerWidth,
+ /* angle */ 0.,
+ events_[j].pressure_));
+ events_[j].type_ = ET_TOUCH_MOVED;
+ DispatchEvent(tev.PassAs<ui::Event>());
+ }
+ }
+ altered_slots_.reset();
+ break;
+ case SYN_MT_REPORT:
+ case SYN_CONFIG:
+ case SYN_DROPPED:
+ NOTREACHED() << "SYN_MT events not supported.";
+ break;
+ }
+ } else {
+ NOTREACHED();
+ }
+ }
+}
+
+} // namespace ui
diff --git a/ui/base/ozone/touch_event_converter_ozone.h b/ui/base/ozone/touch_event_converter_ozone.h
new file mode 100644
index 0000000000..f246b5cce5
--- /dev/null
+++ b/ui/base/ozone/touch_event_converter_ozone.h
@@ -0,0 +1,77 @@
+// 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 UI_BASE_OZONE_TOUCH_EVENT_CONVERTER_OZONE_H_
+#define UI_BASE_OZONE_TOUCH_EVENT_CONVERTER_OZONE_H_
+
+#include <bitset>
+
+#include "base/compiler_specific.h"
+#include "ui/base/events/event_constants.h"
+#include "ui/base/ozone/event_converter_ozone.h"
+#include "ui/base/ui_export.h"
+
+namespace ui {
+
+class TouchEvent;
+
+class UI_EXPORT TouchEventConverterOzone : public EventConverterOzone {
+ public:
+ enum {
+ MAX_FINGERS = 11
+ };
+ TouchEventConverterOzone(int fd, int id);
+ virtual ~TouchEventConverterOzone();
+
+ private:
+ friend class MockTouchEventConverterOzone;
+
+ // Unsafe part of initialization.
+ void Init();
+
+ // Overidden from base::MessagePumpLibevent::Watcher.
+ virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+
+ // Pressure values.
+ int pressure_min_;
+ int pressure_max_; // Used to normalize pressure values.
+
+ // Touch scaling.
+ float x_scale_;
+ float y_scale_;
+
+ // Touch point currently being updated from the /dev/input/event* stream.
+ int current_slot_;
+
+ // File descriptor for the /dev/input/event* instance.
+ int fd_;
+
+ // Number corresponding to * in the source evdev device: /dev/input/event*
+ int id_;
+
+ // Bit field tracking which in-progress touch points have been modified
+ // without a syn event.
+ std::bitset<MAX_FINGERS> altered_slots_;
+
+ struct InProgressEvents {
+ int x_;
+ int y_;
+ int id_; // Device reported "unique" touch point id; -1 means not active
+ int finger_; // "Finger" id starting from 0; -1 means not active
+
+ EventType type_;
+ int major_;
+ float pressure_;
+ };
+
+ // In-progress touch points.
+ InProgressEvents events_[MAX_FINGERS];
+
+ DISALLOW_COPY_AND_ASSIGN(TouchEventConverterOzone);
+};
+
+} // namespace ui
+
+#endif // UI_BASE_OZONE_TOUCH_EVENT_CONVERTER_OZONE_H_
diff --git a/ui/base/ozone/touch_event_converter_ozone_unittest.cc b/ui/base/ozone/touch_event_converter_ozone_unittest.cc
new file mode 100644
index 0000000000..88194dfb5f
--- /dev/null
+++ b/ui/base/ozone/touch_event_converter_ozone_unittest.cc
@@ -0,0 +1,397 @@
+// 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 <errno.h>
+#include <fcntl.h>
+#include <linux/input.h>
+#include <unistd.h>
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "base/message_loop.h"
+#include "base/posix/eintr_wrapper.h"
+#include "base/run_loop.h"
+#include "base/time.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/events/event.h"
+#include "ui/base/ozone/touch_event_converter_ozone.h"
+
+
+namespace {
+
+static int SetNonBlocking(int fd) {
+ int flags = fcntl(fd, F_GETFL, 0);
+ if (flags == -1)
+ flags = 0;
+ return fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+}
+
+} // namespace
+
+namespace ui {
+
+class MockTouchEventConverterOzone : public TouchEventConverterOzone,
+ public base::MessageLoop::Dispatcher {
+ public:
+ MockTouchEventConverterOzone(int a, int b);
+ virtual ~MockTouchEventConverterOzone() {};
+
+ void ConfigureReadMock(struct input_event* queue,
+ long read_this_many,
+ long queue_index);
+
+ unsigned size() { return dispatched_events_.size(); }
+ TouchEvent* event(unsigned index) { return dispatched_events_[index]; }
+
+ // Actually dispatch the event reader code.
+ void ReadNow() {
+ OnFileCanReadWithoutBlocking(read_pipe_);
+ base::RunLoop().RunUntilIdle();
+ }
+
+ virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
+
+ private:
+ int read_pipe_;
+ int write_pipe_;
+
+ ScopedVector<TouchEvent> dispatched_events_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockTouchEventConverterOzone);
+};
+
+MockTouchEventConverterOzone::MockTouchEventConverterOzone(int a, int b)
+ : TouchEventConverterOzone(a, b) {
+ pressure_min_ = 30;
+ pressure_max_ = 60;
+
+ int fds[2];
+
+ DCHECK(pipe(fds) >= 0) << "pipe() failed, errno: " << errno;
+ DCHECK(SetNonBlocking(fds[0]) == 0)
+ << "SetNonBlocking for pipe fd[0] failed, errno: " << errno;
+ DCHECK(SetNonBlocking(fds[1]) == 0)
+ << "SetNonBlocking for pipe fd[0] failed, errno: " << errno;
+ read_pipe_ = fds[0];
+ write_pipe_ = fds[1];
+}
+
+bool MockTouchEventConverterOzone::Dispatch(const base::NativeEvent& event) {
+ ui::TouchEvent* ev = new ui::TouchEvent(event);
+ dispatched_events_.push_back(ev);
+ return true;
+}
+
+void MockTouchEventConverterOzone::ConfigureReadMock(struct input_event* queue,
+ long read_this_many,
+ long queue_index) {
+ int nwrite = HANDLE_EINTR(write(write_pipe_,
+ queue + queue_index,
+ sizeof(struct input_event) * read_this_many));
+ DCHECK(nwrite ==
+ static_cast<int>(sizeof(struct input_event) * read_this_many))
+ << "write() failed, errno: " << errno;
+}
+
+} // namespace ui
+
+// Test fixture.
+class TouchEventConverterOzoneTest : public testing::Test {
+ public:
+ TouchEventConverterOzoneTest() {}
+
+ // Overridden from testing::Test:
+ virtual void SetUp() OVERRIDE {
+ loop_ = new base::MessageLoop(base::MessageLoop::TYPE_UI);
+ device_ = new ui::MockTouchEventConverterOzone(-1, 2);
+ base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(device_);
+ }
+ virtual void TearDown() OVERRIDE {
+ delete device_;
+ delete loop_;
+ }
+
+ ui::MockTouchEventConverterOzone* device() { return device_; }
+
+ private:
+ base::MessageLoop* loop_;
+ ui::MockTouchEventConverterOzone* device_;
+ DISALLOW_COPY_AND_ASSIGN(TouchEventConverterOzoneTest);
+};
+
+// TODO(rjkroege): Test for valid handling of time stamps.
+TEST_F(TouchEventConverterOzoneTest, TouchDown) {
+ ui::MockTouchEventConverterOzone* dev = device();
+
+ struct input_event mock_kernel_queue[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, 684},
+ {{0, 0}, EV_ABS, ABS_MT_TOUCH_MAJOR, 3},
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 45},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 42},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 51}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ dev->ConfigureReadMock(mock_kernel_queue, 1, 0);
+ dev->ReadNow();
+ EXPECT_EQ(0u, dev->size());
+
+ dev->ConfigureReadMock(mock_kernel_queue, 2, 1);
+ dev->ReadNow();
+ EXPECT_EQ(0u, dev->size());
+
+ dev->ConfigureReadMock(mock_kernel_queue, 3, 3);
+ dev->ReadNow();
+ EXPECT_EQ(1u, dev->size());
+
+ ui::TouchEvent* event = dev->event(0);
+ EXPECT_FALSE(event == NULL);
+
+ EXPECT_EQ(ui::ET_TOUCH_PRESSED, event->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
+ EXPECT_EQ(42, event->x());
+ EXPECT_EQ(51, event->y());
+ EXPECT_EQ(0, event->touch_id());
+ EXPECT_FLOAT_EQ(.5f, event->force());
+ EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
+}
+
+TEST_F(TouchEventConverterOzoneTest, NoEvents) {
+ ui::MockTouchEventConverterOzone* dev = device();
+ dev->ConfigureReadMock(NULL, 0, 0);
+ EXPECT_EQ(0u, dev->size());
+}
+
+TEST_F(TouchEventConverterOzoneTest, TouchMove) {
+ ui::MockTouchEventConverterOzone* dev = device();
+
+ struct input_event mock_kernel_queue_press[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, 684},
+ {{0, 0}, EV_ABS, ABS_MT_TOUCH_MAJOR, 3},
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 45},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 42},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 51}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ struct input_event mock_kernel_queue_move1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 50},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 42},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 43}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ struct input_event mock_kernel_queue_move2[] = {
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 42}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ // Setup and discard a press.
+ dev->ConfigureReadMock(mock_kernel_queue_press, 6, 0);
+ dev->ReadNow();
+ EXPECT_EQ(1u, dev->size());
+
+ dev->ConfigureReadMock(mock_kernel_queue_move1, 4, 0);
+ dev->ReadNow();
+ EXPECT_EQ(2u, dev->size());
+ ui::TouchEvent* event = dev->event(1);
+ EXPECT_FALSE(event == NULL);
+
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, event->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
+ EXPECT_EQ(42, event->x());
+ EXPECT_EQ(43, event->y());
+ EXPECT_EQ(0, event->touch_id());
+ EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
+ EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
+
+ dev->ConfigureReadMock(mock_kernel_queue_move2, 2, 0);
+ dev->ReadNow();
+ EXPECT_EQ(3u, dev->size());
+ event = dev->event(2);
+ EXPECT_FALSE(event == NULL);
+
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, event->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
+ EXPECT_EQ(42, event->x());
+ EXPECT_EQ(42, event->y());
+ EXPECT_EQ(0, event->touch_id());
+ EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
+ EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
+}
+
+TEST_F(TouchEventConverterOzoneTest, TouchRelease) {
+ ui::MockTouchEventConverterOzone* dev = device();
+
+ struct input_event mock_kernel_queue_press[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, 684},
+ {{0, 0}, EV_ABS, ABS_MT_TOUCH_MAJOR, 3},
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 45},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 42},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 51}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ struct input_event mock_kernel_queue_release[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, -1}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+
+ // Setup and discard a press.
+ dev->ConfigureReadMock(mock_kernel_queue_press, 6, 0);
+ dev->ReadNow();
+ EXPECT_EQ(1u, dev->size());
+ ui::TouchEvent* event = dev->event(0);
+ EXPECT_FALSE(event == NULL);
+
+ dev->ConfigureReadMock(mock_kernel_queue_release, 2, 0);
+ dev->ReadNow();
+ EXPECT_EQ(2u, dev->size());
+ event = dev->event(1);
+ EXPECT_FALSE(event == NULL);
+
+ EXPECT_EQ(ui::ET_TOUCH_RELEASED, event->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
+ EXPECT_EQ(42, event->x());
+ EXPECT_EQ(51, event->y());
+ EXPECT_EQ(0, event->touch_id());
+ EXPECT_FLOAT_EQ(.5f, event->force());
+ EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
+}
+
+TEST_F(TouchEventConverterOzoneTest, TwoFingerGesture) {
+ ui::MockTouchEventConverterOzone* dev = device();
+
+ ui::TouchEvent* ev0;
+ ui::TouchEvent* ev1;
+
+ struct input_event mock_kernel_queue_press0[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, 684},
+ {{0, 0}, EV_ABS, ABS_MT_TOUCH_MAJOR, 3},
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 45},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 42},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 51}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ // Setup and discard a press.
+ dev->ConfigureReadMock(mock_kernel_queue_press0, 6, 0);
+ dev->ReadNow();
+ EXPECT_EQ(1u, dev->size());
+
+ struct input_event mock_kernel_queue_move0[] = {
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 40}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ // Setup and discard a move.
+ dev->ConfigureReadMock(mock_kernel_queue_move0, 2, 0);
+ dev->ReadNow();
+ EXPECT_EQ(2u, dev->size());
+
+ struct input_event mock_kernel_queue_move0press1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 40}, {{0, 0}, EV_SYN, SYN_REPORT, 0},
+ {{0, 0}, EV_ABS, ABS_MT_SLOT, 1}, {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, 686},
+ {{0, 0}, EV_ABS, ABS_MT_TOUCH_MAJOR, 3},
+ {{0, 0}, EV_ABS, ABS_MT_PRESSURE, 45},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 101},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 102}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ // Move on 0, press on 1.
+ dev->ConfigureReadMock(mock_kernel_queue_move0press1, 9, 0);
+ dev->ReadNow();
+ EXPECT_EQ(4u, dev->size());
+ ev0 = dev->event(2);
+ ev1 = dev->event(3);
+
+ // Move
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, ev0->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
+ EXPECT_EQ(40, ev0->x());
+ EXPECT_EQ(51, ev0->y());
+ EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev0->force());
+ EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
+
+ // Press
+ EXPECT_EQ(ui::ET_TOUCH_PRESSED, ev1->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
+ EXPECT_EQ(101, ev1->x());
+ EXPECT_EQ(102, ev1->y());
+ EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev1->force());
+ EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
+
+ // Stationary 0, Moves 1.
+ struct input_event mock_kernel_queue_stationary0_move1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 40}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ dev->ConfigureReadMock(mock_kernel_queue_stationary0_move1, 2, 0);
+ dev->ReadNow();
+ EXPECT_EQ(5u, dev->size());
+ ev1 = dev->event(4);
+
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, ev1->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
+ EXPECT_EQ(40, ev1->x());
+ EXPECT_EQ(102, ev1->y());
+ EXPECT_EQ(1, ev1->touch_id());
+
+ EXPECT_FLOAT_EQ(.5f, ev1->force());
+ EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
+
+ // Move 0, stationary 1.
+ struct input_event mock_kernel_queue_move0_stationary1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_SLOT, 0}, {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 39},
+ {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ dev->ConfigureReadMock(mock_kernel_queue_move0_stationary1, 3, 0);
+ dev->ReadNow();
+ EXPECT_EQ(6u, dev->size());
+ ev0 = dev->event(5);
+
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, ev0->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
+ EXPECT_EQ(39, ev0->x());
+ EXPECT_EQ(51, ev0->y());
+ EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev0->force());
+ EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
+
+ // Release 0, move 1.
+ struct input_event mock_kernel_queue_release0_move1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, -1}, {{0, 0}, EV_ABS, ABS_MT_SLOT, 1},
+ {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 38}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
+ };
+ dev->ConfigureReadMock(mock_kernel_queue_release0_move1, 4, 0);
+ dev->ReadNow();
+ EXPECT_EQ(8u, dev->size());
+ ev0 = dev->event(6);
+ ev1 = dev->event(7);
+
+ EXPECT_EQ(ui::ET_TOUCH_RELEASED, ev0->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
+ EXPECT_EQ(39, ev0->x());
+ EXPECT_EQ(51, ev0->y());
+ EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev0->force());
+ EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
+
+ EXPECT_EQ(ui::ET_TOUCH_MOVED, ev1->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
+ EXPECT_EQ(38, ev1->x());
+ EXPECT_EQ(102, ev1->y());
+ EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev1->force());
+ EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
+
+ // Release 1.
+ struct input_event mock_kernel_queue_release1[] = {
+ {{0, 0}, EV_ABS, ABS_MT_TRACKING_ID, -1}, {{0, 0}, EV_SYN, SYN_REPORT, 0},
+ };
+ dev->ConfigureReadMock(mock_kernel_queue_release1, 2, 0);
+ dev->ReadNow();
+ EXPECT_EQ(9u, dev->size());
+ ev1 = dev->event(8);
+
+ EXPECT_EQ(ui::ET_TOUCH_RELEASED, ev1->type());
+ EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
+ EXPECT_EQ(38, ev1->x());
+ EXPECT_EQ(102, ev1->y());
+ EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_FLOAT_EQ(.5f, ev1->force());
+ EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
+}
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 6dee8d3348..9845a7a852 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -14,8 +14,8 @@
#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h"
-#include "base/utf_string_conversions.h"
#include "build/build_config.h"
#include "net/base/big_endian.h"
#include "skia/ext/image_operations.h"
@@ -608,7 +608,7 @@ bool ResourceBundle::LoadBitmap(const ResourceHandle& data_handle,
DCHECK(fell_back_to_1x);
scoped_refptr<base::RefCountedMemory> memory(
data_handle.GetStaticMemory(resource_id));
- if (!memory)
+ if (!memory.get())
return false;
if (DecodePNG(memory->front(), memory->size(), bitmap, fell_back_to_1x))
diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc
index 94e03bc2be..46fd33bb7d 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/path_service.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "net/base/big_endian.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index 44f96d1950..ec47d4c079 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/resource/resource_data_dll_win.h"
diff --git a/ui/base/strings/ui_strings.grd b/ui/base/strings/ui_strings.grd
index f028c63c18..0cec6ed0c3 100644
--- a/ui/base/strings/ui_strings.grd
+++ b/ui/base/strings/ui_strings.grd
@@ -462,10 +462,7 @@ need to be translated for each locale.-->
Clear All
</message>
<message name="IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP" desc="The tooltip text for the quiet mode button.">
- Pause notifications for 1 day
- </message>
- <message name="IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOGGLED_TOOLTIP" desc="The tooltip text for the quiet mode button, when toggled.">
- Resume notifications
+ Do not disturb
</message>
<message name="IDS_MESSAGE_CENTER_NO_MESSAGES" desc="The message displayed in the message center when there are no notifications.">
Nothing to see here, move along.
diff --git a/ui/base/strings/ui_strings_am.xtb b/ui/base/strings/ui_strings_am.xtb
index 834925b37b..f53dd31993 100644
--- a/ui/base/strings/ui_strings_am.xtb
+++ b/ui/base/strings/ui_strings_am.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> ባ</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> ሜባ/ሰ</translation>
<translation id="3990502903496589789">የቀኝ ጠርዝ</translation>
-<translation id="5182671122927417841">ቅጥያ አሰናክል</translation>
<translation id="932327136139879170">መነሻ</translation>
<translation id="3909791450649380159">&amp;ቁረጥ</translation>
<translation id="688711909580084195">ርዕስ-አልባ ድረ-ገጽ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">ወደታች አንቀሳቅስ</translation>
<translation id="5329858601952122676">&amp;ሠርዝ</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> ኪባ</translation>
-<translation id="6489863328574614542">የመተግበሪያዎች እና ቅጥያዎች የማሳወቂያ ፍቃዶችን ያዋቅሩ</translation>
<translation id="6659594942844771486">ትር</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> ሜባ</translation>
<translation id="8428213095426709021">ቅንብሮች</translation>
<translation id="2497284189126895209">ሁሉም ፋይሎች</translation>
<translation id="7814458197256864873">&amp;ቅዳ</translation>
<translation id="3889424535448813030">ቀኝ ቀስት</translation>
+<translation id="7135556860107312402">ማሳወቂያዎች ከሚከተሉት እንዲመጡ ፍቀድ፦</translation>
<translation id="1398853756734560583">አስፋ</translation>
+<translation id="4250229828105606438">ቅጽበታዊ ገጽ እይታ</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> ጊባ</translation>
<translation id="1901303067676059328">&amp;ሁሉንም ምረጥ</translation>
<translation id="2168039046890040389">ወደላይ አንቀሳቅስ</translation>
+<translation id="4927753642311223124">እዚህ ምንም የሚታይ ነገር የለም፣ ይቀጥሉ።</translation>
<translation id="2482878487686419369">ማስታወቂያዎች</translation>
<translation id="3183922693828471536">ወደ እዚህ ሸብልል</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">ወደ ቀኝ ሸብልል</translation>
<translation id="2666092431469916601">ላይ</translation>
<translation id="8331626408530291785">ወደ ላይ ሸብልል</translation>
+<translation id="4773379706300191099">የ<ph name="EXTENSION_NAME"/> ማሳወቂያዎችን አሰናክል</translation>
<translation id="7907591526440419938">ፋይል ክፈት</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">ወደ ታች ሸብልል</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> ቴባ/ሰ</translation>
<translation id="6040143037577758943">ዝጋ</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> ባ/ሰ</translation>
-<translation id="477782898153505579">ምንም ማሳወቂያዎች የለዎትም። ዘና ይበሉ!</translation>
<translation id="7457942297256758195">ሁሉንም አጽዳ</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - ማሳወቂያዎች</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ar.xtb b/ui/base/strings/ui_strings_ar.xtb
index d1befe7ff3..07854ad70e 100644
--- a/ui/base/strings/ui_strings_ar.xtb
+++ b/ui/base/strings/ui_strings_ar.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> بايت</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> ميغابايات/ثانية</translation>
<translation id="3990502903496589789">الحافة اليسرى</translation>
-<translation id="5182671122927417841">تعطيل الإضافة</translation>
<translation id="932327136139879170">الصفحة الرئيسية</translation>
<translation id="3909791450649380159">&amp;قص</translation>
<translation id="688711909580084195">صفحة ويب بدون عنوان</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">صفحة إلى أسفل</translation>
<translation id="5329858601952122676">&amp;حذف</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> كيلوبايت</translation>
-<translation id="6489863328574614542">تعيين أذونات الإشعارات للتطبيقات والإضافات</translation>
<translation id="6659594942844771486">علامة تبويب</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> ميغابايت</translation>
<translation id="8428213095426709021">الإعدادات</translation>
<translation id="2497284189126895209">الملفّات كلّها</translation>
<translation id="7814458197256864873">&amp;نسخ</translation>
<translation id="3889424535448813030">مفتاح سهم إلى اليمين</translation>
+<translation id="7135556860107312402">السماح بالإشعارات من الجهات التالية:</translation>
<translation id="1398853756734560583">تكبير</translation>
+<translation id="4250229828105606438">لقطة شاشة</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> غيغابايت</translation>
<translation id="1901303067676059328">تح&amp;ديد الكلّ</translation>
<translation id="2168039046890040389">صفحة إلى أعلى</translation>
+<translation id="4927753642311223124">ليس هناك شيء تراه هنا، انتقل إلى مكان آخر.</translation>
<translation id="2482878487686419369">التنبيهات</translation>
<translation id="3183922693828471536">التمرير إلى هنا</translation>
<translation id="4552416320897244156">مفتاح PgDwn (صفحة إلى أسفل)</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">التمرير إلى اليسار</translation>
<translation id="2666092431469916601">أعلى</translation>
<translation id="8331626408530291785">التمرير إلى أعلى</translation>
+<translation id="4773379706300191099">تعطيل الإشعارات من <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">فتح ملف</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">التمرير إلى أسفل</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> تيرابايت/ثانية</translation>
<translation id="6040143037577758943">إغلاق</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> بايت/ثانية</translation>
-<translation id="477782898153505579">ليس لديك أية إشعارات. استرح!</translation>
<translation id="7457942297256758195">محو الكل</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - الإشعارات</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_bg.xtb b/ui/base/strings/ui_strings_bg.xtb
index f0322a9bb1..e1d58574ae 100644
--- a/ui/base/strings/ui_strings_bg.xtb
+++ b/ui/base/strings/ui_strings_bg.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> Б</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> МБ/сек</translation>
<translation id="3990502903496589789">Десн край</translation>
-<translation id="5182671122927417841">Деактивиране на разширението</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Изрязва&amp;не</translation>
<translation id="688711909580084195">Неозаглавена уеб страница</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Страница надолу</translation>
<translation id="5329858601952122676">&amp;Изтриване</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KБ</translation>
-<translation id="6489863328574614542">Задаване на разрешенията за известия за приложения и разширения</translation>
<translation id="6659594942844771486">Раздел</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> МБ</translation>
<translation id="8428213095426709021">Настройки</translation>
<translation id="2497284189126895209">Всички файлове</translation>
<translation id="7814458197256864873">&amp;Копиране</translation>
<translation id="3889424535448813030">Стрелка надясно</translation>
+<translation id="7135556860107312402">Разрешаване на известията от следните неща:</translation>
<translation id="1398853756734560583">Увеличаване</translation>
+<translation id="4250229828105606438">Eкранна снимка</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> ГБ</translation>
<translation id="1901303067676059328">&amp;Избиране на всички</translation>
<translation id="2168039046890040389">Страница нагоре</translation>
+<translation id="4927753642311223124">Тук няма нищо, продължете нататък.</translation>
<translation id="2482878487686419369">Известия</translation>
<translation id="3183922693828471536">Превъртане до тук</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Превъртане надясно</translation>
<translation id="2666092431469916601">Най-горе</translation>
<translation id="8331626408530291785">Превъртане нагоре</translation>
+<translation id="4773379706300191099">Деактивиране на известията от <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Отваряне на файл</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Превъртане надолу</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> ТБ/сек</translation>
<translation id="6040143037577758943">Затваряне</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> Б/сек</translation>
-<translation id="477782898153505579">Нямате известия. Отпуснете се!</translation>
<translation id="7457942297256758195">Изчистване на всички</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Известия</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_bn.xtb b/ui/base/strings/ui_strings_bn.xtb
index b1f28717fa..f7963abed5 100644
--- a/ui/base/strings/ui_strings_bn.xtb
+++ b/ui/base/strings/ui_strings_bn.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">ডান প্রান্ত</translation>
-<translation id="5182671122927417841">এক্সটেনশান অক্ষম করুন</translation>
<translation id="932327136139879170">হোম</translation>
<translation id="3909791450649380159">ছেদ&amp;ন</translation>
<translation id="688711909580084195">শিরোনামহীন ওয়েবপৃষ্ঠা</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">পৃষ্ঠা উপরে</translation>
<translation id="5329858601952122676">&amp;মুছুন</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">অ্যাপ্লিকেশান এবং এক্সটেনশানগুলির জন্য বিজ্ঞপ্তির অনুমতিগুলি সেট করুন</translation>
<translation id="6659594942844771486">ট্যাব</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">সেটিংস</translation>
<translation id="2497284189126895209">সকল ফাইল</translation>
<translation id="7814458197256864873">&amp;copy</translation>
<translation id="3889424535448813030">Right Arrow</translation>
+<translation id="7135556860107312402">নিম্নলিখিত থেকে বিজ্ঞপ্তিগুলি মঞ্জুরি করুন:</translation>
<translation id="1398853756734560583">বড় করুন</translation>
+<translation id="4250229828105606438">স্ক্রীনশট</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;সকল নির্বাচন করুন</translation>
<translation id="2168039046890040389">পৃষ্ঠা নীচে</translation>
+<translation id="4927753642311223124">এখানে দেখার কিছু নেই , এগিয়ে যান৷</translation>
<translation id="2482878487686419369">বিজ্ঞপ্তিগুলি</translation>
<translation id="3183922693828471536">এখান পর্যন্ত স্ক্রোল করুন</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">ডান দিকে স্ক্রোল করুন</translation>
<translation id="2666092431469916601">শীর্ষ</translation>
<translation id="8331626408530291785">উপরে স্ক্রোল করুন</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> থেকে বিজ্ঞপ্তিগুলি অক্ষম করুন</translation>
<translation id="7907591526440419938">খোলা ফাইল</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">নীচে স্ক্রোল করুন</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">বন্ধ</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">আপনার কাছে কোনো বিজ্ঞপ্তি নেই৷ আরাম করুন!</translation>
<translation id="7457942297256758195">সমস্ত সাফ করুন</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - বিজ্ঞপ্তিগুলি</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ca.xtb b/ui/base/strings/ui_strings_ca.xtb
index 58d2cefc59..260630c287 100644
--- a/ui/base/strings/ui_strings_ca.xtb
+++ b/ui/base/strings/ui_strings_ca.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Extrem dret</translation>
-<translation id="5182671122927417841">Desactiva l'extensió</translation>
<translation id="932327136139879170">Inici</translation>
<translation id="3909791450649380159">Re&amp;talla</translation>
<translation id="688711909580084195">Pàgina web sense títol</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Av Pàg</translation>
<translation id="5329858601952122676">&amp;Suprimeix</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Defineix els permisos de notificacions per a aplicacions i extensions</translation>
<translation id="6659594942844771486">Pestanya</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Configuració</translation>
<translation id="2497284189126895209">Tots els fitxers</translation>
<translation id="7814458197256864873">&amp;Copia</translation>
<translation id="3889424535448813030">Fletxa dreta</translation>
+<translation id="7135556860107312402">Permet notificacions de les fonts següents:</translation>
<translation id="1398853756734560583">Maximitza</translation>
+<translation id="4250229828105606438">Captura de pantalla</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Selecciona-ho &amp;tot</translation>
<translation id="2168039046890040389">Re Pàg</translation>
+<translation id="4927753642311223124">No hi ha cap notificació, podeu continuar.</translation>
<translation id="2482878487686419369">Notificacions</translation>
<translation id="3183922693828471536">Desplaçament fins aquí</translation>
<translation id="4552416320897244156">Av Pàg</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Desplaçament a la dreta</translation>
<translation id="2666092431469916601">Superior</translation>
<translation id="8331626408530291785">Desplaçament amunt</translation>
+<translation id="4773379706300191099">Desactiva les notificacions de <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Obre un fitxer</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Desplaçament avall</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Tanca</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">No teniu cap notificació. Podeu estar tranquil.</translation>
<translation id="7457942297256758195">Esborra-ho tot</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/>: notificacions</translation>
<translation id="8400147561352026160">Maj+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_cs.xtb b/ui/base/strings/ui_strings_cs.xtb
index 7d90fa162a..4beb296681 100644
--- a/ui/base/strings/ui_strings_cs.xtb
+++ b/ui/base/strings/ui_strings_cs.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Pravý okraj</translation>
-<translation id="5182671122927417841">Deaktivovat rozšíření</translation>
<translation id="932327136139879170">Domů</translation>
<translation id="3909791450649380159">Vyjmou&amp;t</translation>
<translation id="688711909580084195">Nepojmenovaná webová stránka</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Klávesa PageDown</translation>
<translation id="5329858601952122676">&amp;Smazat</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Nastavit povolení oznámení pro aplikace a rozšíření</translation>
<translation id="6659594942844771486">Karta</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Nastavení</translation>
<translation id="2497284189126895209">Všechny soubory</translation>
<translation id="7814458197256864873">&amp;Kopírovat</translation>
<translation id="3889424535448813030">Klávesa šipka vpravo</translation>
+<translation id="7135556860107312402">Povolit oznámení z následujících zdrojů:</translation>
<translation id="1398853756734560583">Maximalizovat</translation>
+<translation id="4250229828105606438">Snímek obrazovky</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;Vybrat vše</translation>
<translation id="2168039046890040389">Klávesa PageUp</translation>
+<translation id="4927753642311223124">Tady není nic k vidění, rozejděte se.</translation>
<translation id="2482878487686419369">Oznámení</translation>
<translation id="3183922693828471536">Posunout sem</translation>
<translation id="4552416320897244156">Klávesa PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Posuv doprava</translation>
<translation id="2666092431469916601">Nahoru</translation>
<translation id="8331626408530291785">Posuv nahoru</translation>
+<translation id="4773379706300191099">Deaktivovat oznámení rozšíření <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Otevřít soubor</translation>
<translation id="1293699935367580298">Klávesa Esc</translation>
<translation id="815598010540052116">Posuv dolů</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Zavřít</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Můžete být klidní, nemáte žádná oznámení.</translation>
<translation id="7457942297256758195">Vymazat vše</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – oznámení</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_da.xtb b/ui/base/strings/ui_strings_da.xtb
index 749ca73e19..61b6172736 100644
--- a/ui/base/strings/ui_strings_da.xtb
+++ b/ui/base/strings/ui_strings_da.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sek.</translation>
<translation id="3990502903496589789">Højre kant</translation>
-<translation id="5182671122927417841">Deaktiver udvidelse</translation>
<translation id="932327136139879170">Start</translation>
<translation id="3909791450649380159">Kli&amp;p</translation>
<translation id="688711909580084195">Ikke-navngivet webside</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Side ned</translation>
<translation id="5329858601952122676">&amp;Slet</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Angiv tilladelser for underretninger for apps og udvidelser</translation>
<translation id="6659594942844771486">Fane</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Indstillinger</translation>
<translation id="2497284189126895209">Alle filer</translation>
<translation id="7814458197256864873">&amp;Kopier</translation>
<translation id="3889424535448813030">Højrepil</translation>
+<translation id="7135556860107312402">Tillad underretninger fra følgende:</translation>
<translation id="1398853756734560583">Maksimer</translation>
+<translation id="4250229828105606438">Skærmbillede</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Vælg &amp;alle</translation>
<translation id="2168039046890040389">Side op</translation>
+<translation id="4927753642311223124">Der er intet at se her, så du kan bare gå videre.</translation>
<translation id="2482878487686419369">Meddelelser</translation>
<translation id="3183922693828471536">Scroll hertil</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Scroll til højre</translation>
<translation id="2666092431469916601">Top</translation>
<translation id="8331626408530291785">Scroll Up</translation>
+<translation id="4773379706300191099">Deaktiver underretninger fra <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Åbn fil</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Scroll Down</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sek.</translation>
<translation id="6040143037577758943">Luk</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sek.</translation>
-<translation id="477782898153505579">Du har ingen underretninger. Bare rolig!</translation>
<translation id="7457942297256758195">Ryd alle</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Underretninger</translation>
<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_de.xtb b/ui/base/strings/ui_strings_de.xtb
index 7a02bfcff8..4e65bd9753 100644
--- a/ui/base/strings/ui_strings_de.xtb
+++ b/ui/base/strings/ui_strings_de.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Rechter Rand</translation>
-<translation id="5182671122927417841">Erweiterung deaktivieren</translation>
<translation id="932327136139879170">Startseite</translation>
<translation id="3909791450649380159">&amp;Ausschneiden</translation>
<translation id="688711909580084195">Unbenannte Webseite</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Nach unten</translation>
<translation id="5329858601952122676">&amp;Löschen</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Berechtigungen für die Benachrichtigung durch Apps und Erweiterungen festlegen</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Einstellungen</translation>
<translation id="2497284189126895209">Alle Dateien</translation>
<translation id="7814458197256864873">&amp;Kopieren</translation>
<translation id="3889424535448813030">Rechtspfeil</translation>
+<translation id="7135556860107312402">Alle Benachrichtigungen zulassen von:</translation>
<translation id="1398853756734560583">Vergrößern</translation>
+<translation id="4250229828105606438">Screenshot</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;Alles auswählen</translation>
<translation id="2168039046890040389">Nach oben</translation>
+<translation id="4927753642311223124">Sie haben keine Benachrichtigungen.</translation>
<translation id="2482878487686419369">Benachrichtigungen</translation>
<translation id="3183922693828471536">Hierher blättern</translation>
<translation id="4552416320897244156">BildAb</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Nach rechts blättern</translation>
<translation id="2666092431469916601">Oben</translation>
<translation id="8331626408530291785">Nach oben blättern</translation>
+<translation id="4773379706300191099">Benachrichtigungen von <ph name="EXTENSION_NAME"/> deaktivieren</translation>
<translation id="7907591526440419938">Datei öffnen</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Nach unten blättern</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Schließen</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> Byte/s</translation>
-<translation id="477782898153505579">Sie haben keine Benachrichtigungen.</translation>
<translation id="7457942297256758195">Alle löschen</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Benachrichtigungen</translation>
<translation id="8400147561352026160">Umschalt+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_el.xtb b/ui/base/strings/ui_strings_el.xtb
index 99303dda45..c072b3b105 100644
--- a/ui/base/strings/ui_strings_el.xtb
+++ b/ui/base/strings/ui_strings_el.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> Β</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Δεξιά άκρη</translation>
-<translation id="5182671122927417841">Απενεργοποίηση επέκτασης</translation>
<translation id="932327136139879170">Αρχική σελίδα</translation>
<translation id="3909791450649380159">Απο&amp;κοπή</translation>
<translation id="688711909580084195">Ιστοσελίδα χωρίς τίτλο</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Επόμενη σελίδα</translation>
<translation id="5329858601952122676">&amp;Διαγραφή</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Ρύθμιση δικαιωμάτων ειδοποίησης για εφαρμογές και επεκτάσεις</translation>
<translation id="6659594942844771486">Καρτέλα</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Ρυθμίσεις</translation>
<translation id="2497284189126895209">Όλα τα αρχεία</translation>
<translation id="7814458197256864873">&amp;Αντιγραφή</translation>
<translation id="3889424535448813030">Δεξιό βέλος</translation>
+<translation id="7135556860107312402">Να επιτρέπονται ειδοποιήσεις από:</translation>
<translation id="1398853756734560583">Μεγιστοποίηση</translation>
+<translation id="4250229828105606438">Στιγμιότυπο οθόνης</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Επιλογή όλ&amp;ων</translation>
<translation id="2168039046890040389">Προηγούμενη σελίδα</translation>
+<translation id="4927753642311223124">Δεν υπάρχει τίποτα να δείτε εδώ, συνεχίστε με αυτό που κάνατε.</translation>
<translation id="2482878487686419369">Ειδοποιήσεις</translation>
<translation id="3183922693828471536">Κύλιση εδώ</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Κύλιση δεξιά</translation>
<translation id="2666092431469916601">Κορυφή</translation>
<translation id="8331626408530291785">Κύλιση επάνω</translation>
+<translation id="4773379706300191099">Απενεργοποίηση ειδοποιήσεων από <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Άνοιγμα Αρχείου</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Κύλιση κάτω</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Κλείσιμο</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Δεν έχετε ειδοποιήσεις. Χαλαρώστε!</translation>
<translation id="7457942297256758195">Εκκαθάριση όλων</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Ειδοποιήσεις</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_en-GB.xtb b/ui/base/strings/ui_strings_en-GB.xtb
index 0e71b7bb0f..012809d651 100644
--- a/ui/base/strings/ui_strings_en-GB.xtb
+++ b/ui/base/strings/ui_strings_en-GB.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Right Edge</translation>
-<translation id="5182671122927417841">Disable extension</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Cu&amp;t</translation>
<translation id="688711909580084195">Untitled Web Page</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Delete</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Set notification permissions for apps and extensions</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Settings</translation>
<translation id="2497284189126895209">All Files</translation>
<translation id="7814458197256864873">&amp;Copy</translation>
<translation id="3889424535448813030">Right Arrow</translation>
+<translation id="7135556860107312402">Allow notifications from the following:</translation>
<translation id="1398853756734560583">Maximise</translation>
+<translation id="4250229828105606438">Screenshot</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Select &amp;all</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Nothing to see here, move along.</translation>
<translation id="2482878487686419369">Notifications</translation>
<translation id="3183922693828471536">Scroll to Here</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Scroll Right</translation>
<translation id="2666092431469916601">Top</translation>
<translation id="8331626408530291785">Scroll Up</translation>
+<translation id="4773379706300191099">Disable notifications from <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Open File</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Scroll Down</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Close</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">You have no notifications. Relax!</translation>
<translation id="7457942297256758195">Clear All</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Notifications</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_es-419.xtb b/ui/base/strings/ui_strings_es-419.xtb
index 9395496f9b..b24dfcec77 100644
--- a/ui/base/strings/ui_strings_es-419.xtb
+++ b/ui/base/strings/ui_strings_es-419.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> de MB</translation>
<translation id="3990502903496589789">Borde derecho</translation>
-<translation id="5182671122927417841">Inhabilitar extensión</translation>
<translation id="932327136139879170">Inicio</translation>
<translation id="3909791450649380159">Cor&amp;tar</translation>
<translation id="688711909580084195">Página web sin título</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Avanzar página</translation>
<translation id="5329858601952122676">&amp;Suprimir</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Establecer permisos de notificación de aplicaciones y extensiones</translation>
<translation id="6659594942844771486">Pestaña</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Configuración</translation>
<translation id="2497284189126895209">Todos los archivos</translation>
<translation id="7814458197256864873">&amp;Copiar</translation>
<translation id="3889424535448813030">Flecha derecha</translation>
+<translation id="7135556860107312402">Permitir notificaciones de:</translation>
<translation id="1398853756734560583">Maximizar</translation>
+<translation id="4250229828105606438">Captura de pantalla</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Seleccionar &amp;todo</translation>
<translation id="2168039046890040389">Retroceder página</translation>
+<translation id="4927753642311223124">No hay ningún elemento que mostrar.</translation>
<translation id="2482878487686419369">Notificaciones</translation>
<translation id="3183922693828471536">Desplazarse hasta aquí</translation>
<translation id="4552416320897244156">AvPág</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Desplazar a la derecha</translation>
<translation id="2666092431469916601">Superior</translation>
<translation id="8331626408530291785">Desplazar hacia arriba</translation>
+<translation id="4773379706300191099">Inhabilitar las notificaciones de <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Abrir archivo</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Desplazar hacia abajo</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Cerrar</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">No tienes notificaciones. ¡Relájate!</translation>
<translation id="7457942297256758195">Borrar todo</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/>: Notificaciones</translation>
<translation id="8400147561352026160">Mayús+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_es.xtb b/ui/base/strings/ui_strings_es.xtb
index f7402b328b..7337307a09 100644
--- a/ui/base/strings/ui_strings_es.xtb
+++ b/ui/base/strings/ui_strings_es.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Borde derecho</translation>
-<translation id="5182671122927417841">Inhabilitar extensiones</translation>
<translation id="932327136139879170">Inicio</translation>
<translation id="3909791450649380159">Cor&amp;tar</translation>
<translation id="688711909580084195">Página web sin título</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Avanzar página</translation>
<translation id="5329858601952122676">&amp;Suprimir</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Establece los permisos de notificaciones para aplicaciones y extensiones</translation>
<translation id="6659594942844771486">Pestaña</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Configuración</translation>
<translation id="2497284189126895209">Todos los archivos</translation>
<translation id="7814458197256864873">&amp;Copiar</translation>
<translation id="3889424535448813030">Flecha derecha</translation>
+<translation id="7135556860107312402">Permitir notificaciones de:</translation>
<translation id="1398853756734560583">Maximizar</translation>
+<translation id="4250229828105606438">Captura de pantalla</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Seleccionar &amp;todo</translation>
<translation id="2168039046890040389">Retroceder página</translation>
+<translation id="4927753642311223124">Aquí no hay nada que ver, circulen...</translation>
<translation id="2482878487686419369">Notificaciones</translation>
<translation id="3183922693828471536">Desplazarse hasta aquí</translation>
<translation id="4552416320897244156">AvPág</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Desplazar a la derecha</translation>
<translation id="2666092431469916601">Superior</translation>
<translation id="8331626408530291785">Desplazar hacia arriba</translation>
+<translation id="4773379706300191099">Inhabilitar notificaciones de <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Abrir archivo</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Desplazar hacia abajo</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Cerrar</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">No tienes notificaciones. ¡Relájate!</translation>
<translation id="7457942297256758195">Borrar todo</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/>: notificaciones</translation>
<translation id="8400147561352026160">Mayús+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_et.xtb b/ui/base/strings/ui_strings_et.xtb
index adc3b2baa2..929cf47c41 100644
--- a/ui/base/strings/ui_strings_et.xtb
+++ b/ui/base/strings/ui_strings_et.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Parem serv</translation>
-<translation id="5182671122927417841">Laienduste keelamine</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Lõ&amp;ika</translation>
<translation id="688711909580084195">Nimeta veebileht</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Lehekülje lõppu</translation>
<translation id="5329858601952122676">&amp;Kustuta</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Määrake rakendustele ja laiendustele märguannete load</translation>
<translation id="6659594942844771486">Vaheleht</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Seaded</translation>
<translation id="2497284189126895209">Kõik failid</translation>
<translation id="7814458197256864873">&amp;Kopeeri</translation>
<translation id="3889424535448813030">Paremnool</translation>
+<translation id="7135556860107312402">Luba märguanded järgmistest kohtadest:</translation>
<translation id="1398853756734560583">Maksimeeri</translation>
+<translation id="4250229828105606438">Ekraanipilt</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Vali &amp;kõik</translation>
<translation id="2168039046890040389">Lehekülje üles</translation>
+<translation id="4927753642311223124">Siin pole ühtegi märguannet, liikuge edasi.</translation>
<translation id="2482878487686419369">Teatised</translation>
<translation id="3183922693828471536">Keri siia</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Keri paremale</translation>
<translation id="2666092431469916601">Üles</translation>
<translation id="8331626408530291785">Keri üles</translation>
+<translation id="4773379706300191099">Keela märguanded laiendusest <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Faili avamine</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Keri alla</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Sule</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Teile ei ole märguandeid. Ärge muretsege.</translation>
<translation id="7457942297256758195">Kustuta kõik</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – märguanded</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_fa.xtb b/ui/base/strings/ui_strings_fa.xtb
index e1c0ff7ae4..885153372c 100644
--- a/ui/base/strings/ui_strings_fa.xtb
+++ b/ui/base/strings/ui_strings_fa.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> بایت</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> مگابایت/ثانیه</translation>
<translation id="3990502903496589789">حاشیه راست</translation>
-<translation id="5182671122927417841">غیرفعال کردن برنامهٔ افزودنی</translation>
<translation id="932327136139879170">صفحهٔ اصلی</translation>
<translation id="3909791450649380159">&amp;برش</translation>
<translation id="688711909580084195">صفحهٔ وب بدون عنوان</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;حذف</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> کیلوبایت</translation>
-<translation id="6489863328574614542">تنظیم مجوزهای اعلان برای برنامه‌ها و برنامه‌های افزودنی</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> مگابایت</translation>
<translation id="8428213095426709021">تنظیمات</translation>
<translation id="2497284189126895209">همه فایل‌ها</translation>
<translation id="7814458197256864873">&amp;کپی</translation>
<translation id="3889424535448813030">پیکان راست</translation>
+<translation id="7135556860107312402">اعلان موارد زیر مجاز باشد:</translation>
<translation id="1398853756734560583">بزرگ کردن</translation>
+<translation id="4250229828105606438">عکس از صفحه نمایش</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> گیگابایت</translation>
<translation id="1901303067676059328">انتخاب &amp;همه</translation>
<translation id="2168039046890040389">صفحه بالا</translation>
+<translation id="4927753642311223124">اینجا خبری نیست، برگردید.</translation>
<translation id="2482878487686419369">اعلام ها</translation>
<translation id="3183922693828471536">پیمایش به اینجا</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">پیمایش به راست</translation>
<translation id="2666092431469916601">بالا</translation>
<translation id="8331626408530291785">پیمایش به بالا</translation>
+<translation id="4773379706300191099">از کار انداختن اعلان‌های <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">باز کردن فایل</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">پیمایش به پایین</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> ترابایت/ثانیه</translation>
<translation id="6040143037577758943">بستن</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> بایت/ثانیه</translation>
-<translation id="477782898153505579">اعلانی ندارید. آرام باشید!</translation>
<translation id="7457942297256758195">پاک کردن همه</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - اعلان‌ها</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_fi.xtb b/ui/base/strings/ui_strings_fi.xtb
index 69fcc3d6f8..dc45ca913d 100644
--- a/ui/base/strings/ui_strings_fi.xtb
+++ b/ui/base/strings/ui_strings_fi.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> t</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> Mt/s</translation>
<translation id="3990502903496589789">Oikea reuna</translation>
-<translation id="5182671122927417841">Laajennuksen poistaminen käytöstä</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">L&amp;eikkaa</translation>
<translation id="688711909580084195">Nimetön verkkosivu</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Sivu alas</translation>
<translation id="5329858601952122676">&amp;Poista</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kt</translation>
-<translation id="6489863328574614542">Aseta sovellusten ja laajennusten ilmoitusluvat</translation>
<translation id="6659594942844771486">Välilehti</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> Mt</translation>
<translation id="8428213095426709021">Asetukset</translation>
<translation id="2497284189126895209">Kaikki tiedostot</translation>
<translation id="7814458197256864873">K&amp;opioi</translation>
<translation id="3889424535448813030">Nuoli oik.</translation>
+<translation id="7135556860107312402">Salli ilmoitukset seuraavista:</translation>
<translation id="1398853756734560583">Suurenna</translation>
+<translation id="4250229828105606438">Kuvakaappaus</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> Gt</translation>
<translation id="1901303067676059328">Valitse &amp;kaikki</translation>
<translation id="2168039046890040389">Sivu ylös</translation>
+<translation id="4927753642311223124">Täällä ei ole mitään nähtävää.</translation>
<translation id="2482878487686419369">Ilmoitukset</translation>
<translation id="3183922693828471536">Vieritä tähän</translation>
<translation id="4552416320897244156">Sivu alas</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Vieritä oikealle</translation>
<translation id="2666092431469916601">Yleisin</translation>
<translation id="8331626408530291785">Vieritä ylös</translation>
+<translation id="4773379706300191099">Poista ilmoitukset käytöstä laajennukselta <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Avaa tiedosto</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Vieritä alas</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> Tt/s</translation>
<translation id="6040143037577758943">Sulje</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> t/s</translation>
-<translation id="477782898153505579">Ei ilmoituksia. Ei hätää!</translation>
<translation id="7457942297256758195">Tyhjennä kaikki</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – ilmoitukset</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_fil.xtb b/ui/base/strings/ui_strings_fil.xtb
index 246e09cdc4..934dbb8296 100644
--- a/ui/base/strings/ui_strings_fil.xtb
+++ b/ui/base/strings/ui_strings_fil.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> (na) B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> (na) MB/s</translation>
<translation id="3990502903496589789">Tamang Lamang</translation>
-<translation id="5182671122927417841">Huwag paganahin ang extension</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Al&amp;isin</translation>
<translation id="688711909580084195">Walang Pamagat na Webpage</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Tanggalin</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Magtakda ng mga pagpapahintulot sa notification para sa apps at mga extension</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> (na) MB</translation>
<translation id="8428213095426709021">Mga Setting</translation>
<translation id="2497284189126895209">Lahat ng Mga File</translation>
<translation id="7814458197256864873">&amp;Kopyahin</translation>
<translation id="3889424535448813030">Right Arrow</translation>
+<translation id="7135556860107312402">Payagan ang mga notification mula sa sumusunod:</translation>
<translation id="1398853756734560583">Maximize</translation>
+<translation id="4250229828105606438">Screenshot</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> (na) GB</translation>
<translation id="1901303067676059328">Piliin ang &amp;lahat</translation>
<translation id="2168039046890040389">Pataas</translation>
+<translation id="4927753642311223124">Walang makikita rito, magpatuloy.</translation>
<translation id="2482878487686419369">Mga Abiso</translation>
<translation id="3183922693828471536">Mag-scroll dito</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Mag-scroll Pakanan</translation>
<translation id="2666092431469916601">Tuktok</translation>
<translation id="8331626408530291785">Mag-scroll Pataas</translation>
+<translation id="4773379706300191099">I-disable ang mga notification mula sa <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Buksan ang File</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Mag-scroll Pababa</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> (na) TB/s</translation>
<translation id="6040143037577758943">Isara</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> (na) B/s</translation>
-<translation id="477782898153505579">Wala kang mga notification. Relax!</translation>
<translation id="7457942297256758195">I-clear Lahat</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Mga Notification</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_fr.xtb b/ui/base/strings/ui_strings_fr.xtb
index c272f0542b..a43c7c4524 100644
--- a/ui/base/strings/ui_strings_fr.xtb
+++ b/ui/base/strings/ui_strings_fr.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> o</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> Mo/s</translation>
<translation id="3990502903496589789">Côté droit</translation>
-<translation id="5182671122927417841">Désactiver l'extension</translation>
<translation id="932327136139879170">Début</translation>
<translation id="3909791450649380159">Cou&amp;per</translation>
<translation id="688711909580084195">Page Web sans titre</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page suivante</translation>
<translation id="5329858601952122676">&amp;Supprimer</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> Ko</translation>
-<translation id="6489863328574614542">Définir les autorisations de notification des applications et des extensions</translation>
<translation id="6659594942844771486">Onglet</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> Mo</translation>
<translation id="8428213095426709021">Paramètres</translation>
<translation id="2497284189126895209">Tous les fichiers</translation>
<translation id="7814458197256864873">&amp;Copier</translation>
<translation id="3889424535448813030">Droite</translation>
+<translation id="7135556860107312402">Autoriser les notifications des éléments suivants :</translation>
<translation id="1398853756734560583">Agrandir</translation>
+<translation id="4250229828105606438">Capture d'écran</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> Go</translation>
<translation id="1901303067676059328">&amp;Tout sélectionner</translation>
<translation id="2168039046890040389">Page précédente</translation>
+<translation id="4927753642311223124">Aucune notification</translation>
<translation id="2482878487686419369">Notifications</translation>
<translation id="3183922693828471536">Défilement jusqu'ici</translation>
<translation id="4552416320897244156">PgSuiv</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Défilement vers la droite</translation>
<translation id="2666092431469916601">En haut</translation>
<translation id="8331626408530291785">Défilement vers le haut</translation>
+<translation id="4773379706300191099">Désactiver les notifications de l'extension &quot;<ph name="EXTENSION_NAME"/>&quot;</translation>
<translation id="7907591526440419938">Ouvrir le fichier</translation>
<translation id="1293699935367580298">Échap</translation>
<translation id="815598010540052116">Défilement vers le bas</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> To/s</translation>
<translation id="6040143037577758943">Fermer</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> o/s</translation>
-<translation id="477782898153505579">Vous n'avez reçu aucune notification.</translation>
<translation id="7457942297256758195">Tout effacer</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Notifications</translation>
<translation id="8400147561352026160">Maj+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_gu.xtb b/ui/base/strings/ui_strings_gu.xtb
index e7db0dac2a..dd5aecbd70 100644
--- a/ui/base/strings/ui_strings_gu.xtb
+++ b/ui/base/strings/ui_strings_gu.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> અબજ</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">જમણી કિનારી</translation>
-<translation id="5182671122927417841">એક્સ્ટેંશનને અક્ષમ કરો</translation>
<translation id="932327136139879170">હોમ</translation>
<translation id="3909791450649380159">કા&amp;પો</translation>
<translation id="688711909580084195">શીર્ષક વિનાનું વેબપૃષ્ઠ </translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">પૃષ્ઠ નીચે</translation>
<translation id="5329858601952122676">&amp;કાઢી નાખો</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">એપ્લિકેશન અને એક્સ્ટેન્સશન્સ માટે સૂચના પરવાનગીઓ સેટ કરો</translation>
<translation id="6659594942844771486">ટૅબ</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/>MB</translation>
<translation id="8428213095426709021">સેટિંગ્સ</translation>
<translation id="2497284189126895209">બધી ફાઇલો</translation>
<translation id="7814458197256864873">&amp;કૉપિ કરો</translation>
<translation id="3889424535448813030">જમણો એરો</translation>
+<translation id="7135556860107312402">નીચેના પરથી સૂચનાઓને મંજૂરી આપો:</translation>
<translation id="1398853756734560583">મોટું કરો</translation>
+<translation id="4250229828105606438">સ્ક્રીનશૉટ</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;બધા પસંદ કરો</translation>
<translation id="2168039046890040389">પૃષ્ઠ ઉપર</translation>
+<translation id="4927753642311223124">અહીં જોવા માટે કંઈ નથી, આગળ વધો.</translation>
<translation id="2482878487686419369">સૂચનાઓ</translation>
<translation id="3183922693828471536">અહીં સુધી સ્ક્રોલ કરો</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">જમણે સ્ક્રોલ કરો</translation>
<translation id="2666092431469916601">ઉપર</translation>
<translation id="8331626408530291785">ઉપર સ્ક્રોલ કરો</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> થી સૂચનાઓને અક્ષમ કરો</translation>
<translation id="7907591526440419938">ફાઇલ ખોલો</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">નીચે સ્ક્રોલ કરો</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">બંધ કરો</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">તમારી પાસે કોઈ સૂચનાઓ નથી. આરામ કરો!</translation>
<translation id="7457942297256758195">બધું સાફ કરો</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - સૂચનાઓ</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_hi.xtb b/ui/base/strings/ui_strings_hi.xtb
index ebe59c13c9..5b0fc7cf10 100644
--- a/ui/base/strings/ui_strings_hi.xtb
+++ b/ui/base/strings/ui_strings_hi.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> बाइट</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">दायां सिरा</translation>
-<translation id="5182671122927417841">एक्सटेंशन अक्षम करें</translation>
<translation id="932327136139879170">मुखपृष्ठ</translation>
<translation id="3909791450649380159">&amp;काटें</translation>
<translation id="688711909580084195">शीर्षक-रहित वेबपृष्ठ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;हटाएं</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">एप्लिकेशन और एक्सटेंशन के लिए सूचना अनुमतियां सेट करें</translation>
<translation id="6659594942844771486">टैब</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">सेटिंग</translation>
<translation id="2497284189126895209">सभी फ़ाइलें</translation>
<translation id="7814458197256864873">&amp;प्रतिलिपि बनाएं</translation>
<translation id="3889424535448813030">दायां तीर</translation>
+<translation id="7135556860107312402">निम्न से आने वाली सूचनाओं की अनुमति दें:</translation>
<translation id="1398853756734560583">बड़ा करें</translation>
+<translation id="4250229828105606438">स्क्रीनशॉट</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;सभी को चुनें</translation>
<translation id="2168039046890040389">पृष्ठ ऊपर</translation>
+<translation id="4927753642311223124">यहां देखने के लिए कुछ भी नहीं है, आगे चलें.</translation>
<translation id="2482878487686419369">अधिसूचनाएं</translation>
<translation id="3183922693828471536">यहां तक स्क्रॉल करें</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">दाएं स्क्रॉल करें</translation>
<translation id="2666092431469916601">शीर्ष</translation>
<translation id="8331626408530291785">ऊपर स्क्रॉल करें</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> की सूचनाएं अक्षम करें</translation>
<translation id="7907591526440419938">फ़ाइल खोलें</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">नीचे स्क्रॉल करें</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">बंद करें</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">आपके पास कोई सूचना नहीं है. धैर्य रखें!</translation>
<translation id="7457942297256758195">सभी साफ़ करें</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - सूचनाएं</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_hr.xtb b/ui/base/strings/ui_strings_hr.xtb
index 65638cabff..884ea0b1e2 100644
--- a/ui/base/strings/ui_strings_hr.xtb
+++ b/ui/base/strings/ui_strings_hr.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Desni rub</translation>
-<translation id="5182671122927417841">Onemogući proširenje</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Iz&amp;reži</translation>
<translation id="688711909580084195">Web-stranica bez naslova</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Stranica prema dolje</translation>
<translation id="5329858601952122676">&amp;Obriši</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Postavite dozvole obavijesti za aplikacije i proširenja</translation>
<translation id="6659594942844771486">Kartica</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Postavke</translation>
<translation id="2497284189126895209">Sve datoteke</translation>
<translation id="7814458197256864873">&amp;Kopiraj</translation>
<translation id="3889424535448813030">Strelica desno</translation>
+<translation id="7135556860107312402">Omogućite obavijesti iz sljedećih izvora:</translation>
<translation id="1398853756734560583">Maksimiziraj</translation>
+<translation id="4250229828105606438">Snimka zaslona</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Odaberi &amp;sve</translation>
<translation id="2168039046890040389">Stranica prema gore</translation>
+<translation id="4927753642311223124">Nema nikakvih obavijesti.</translation>
<translation id="2482878487686419369">Obavijesti</translation>
<translation id="3183922693828471536">Pomakni ovdje</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Pomakni se desno</translation>
<translation id="2666092431469916601">Gornji</translation>
<translation id="8331626408530291785">Pomakni se gore</translation>
+<translation id="4773379706300191099">Onemogućivanje obavijesti proširenja <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Otvori datoteku</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Pomakni se dolje</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Zatvori</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Nemate nijednu obavijest. Opustite se!</translation>
<translation id="7457942297256758195">Očisti sve</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – obavijesti</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_hu.xtb b/ui/base/strings/ui_strings_hu.xtb
index 392f87af58..753347f0e2 100644
--- a/ui/base/strings/ui_strings_hu.xtb
+++ b/ui/base/strings/ui_strings_hu.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> bájt</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Jobb sarok</translation>
-<translation id="5182671122927417841">Bővítmény kikapcsolása</translation>
<translation id="932327136139879170">Főoldal</translation>
<translation id="3909791450649380159">Ki&amp;vágás</translation>
<translation id="688711909580084195">Névtelen weboldal</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Törlés</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Értesítési engedélyek beállítása alkalmazásokhoz és bővítményekhez</translation>
<translation id="6659594942844771486">Lap</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Beállítások</translation>
<translation id="2497284189126895209">Minden fájl</translation>
<translation id="7814458197256864873">&amp;Másolás</translation>
<translation id="3889424535448813030">Jobb nyíl</translation>
+<translation id="7135556860107312402">Értesítések engedélyezése a következőtől:</translation>
<translation id="1398853756734560583">Teljes méret</translation>
+<translation id="4250229828105606438">Képernyőkép</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Össz&amp;es kiválasztása</translation>
<translation id="2168039046890040389">Oldal fel</translation>
+<translation id="4927753642311223124">Itt nincs semmi, továbbmehet.</translation>
<translation id="2482878487686419369">Értesítések</translation>
<translation id="3183922693828471536">Görgessen ide</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Görgetés jobbra</translation>
<translation id="2666092431469916601">Felülre</translation>
<translation id="8331626408530291785">Görgetés felfelé</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> értesítéseinek kikapcsolása</translation>
<translation id="7907591526440419938">Fájl megnyitása</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Görgetés lefelé</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Bezárás</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Nincsenek értesítések. Lazíthat!</translation>
<translation id="7457942297256758195">Összes törlése</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Értesítések</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_id.xtb b/ui/base/strings/ui_strings_id.xtb
index 411f6638c2..3e47ad904e 100644
--- a/ui/base/strings/ui_strings_id.xtb
+++ b/ui/base/strings/ui_strings_id.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/dtk</translation>
<translation id="3990502903496589789">Tepi Kanan</translation>
-<translation id="5182671122927417841">Nonaktifkan ekstensi</translation>
<translation id="932327136139879170">Beranda</translation>
<translation id="3909791450649380159">Po&amp;tong</translation>
<translation id="688711909580084195">Laman Web Tanpa Judul</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Hapus</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Setel izin pemberitahuan untuk aplikasi dan ekstensi</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Setelan</translation>
<translation id="2497284189126895209">Semua Jenis File</translation>
<translation id="7814458197256864873">&amp;Salin</translation>
<translation id="3889424535448813030">Panah Kanan</translation>
+<translation id="7135556860107312402">Izinkan pemberitahuan dari yang berikut:</translation>
<translation id="1398853756734560583">Perbesar</translation>
+<translation id="4250229828105606438">Tangkapan layar</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Pilih semu&amp;a</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Tidak ada apa-apa di sini, lihat yang lain saja.</translation>
<translation id="2482878487686419369">Pemberitahuan</translation>
<translation id="3183922693828471536">Gulir ke Sini</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Gulir ke Kanan</translation>
<translation id="2666092431469916601">Atas</translation>
<translation id="8331626408530291785">Gulir ke Atas</translation>
+<translation id="4773379706300191099">Nonaktifkan pemberitahuan dari <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Buka File</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Gulir ke Bawah</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/dtk</translation>
<translation id="6040143037577758943">Tutup</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/dtk</translation>
-<translation id="477782898153505579">Tidak ada pemberitahuan. Santai saja!</translation>
<translation id="7457942297256758195">Hapus Semua</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Pemberitahuan</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_it.xtb b/ui/base/strings/ui_strings_it.xtb
index a2b20d68e8..6487e1054b 100644
--- a/ui/base/strings/ui_strings_it.xtb
+++ b/ui/base/strings/ui_strings_it.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Margine destro</translation>
-<translation id="5182671122927417841">Disattiva estensione</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">T&amp;aglia</translation>
<translation id="688711909580084195">Pagina web senza titolo</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Pagina giù</translation>
<translation id="5329858601952122676">&amp;Elimina</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Imposta le autorizzazioni relative alle notifiche per app ed estensioni</translation>
<translation id="6659594942844771486">TAB</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Impostazioni</translation>
<translation id="2497284189126895209">Tutti i file</translation>
<translation id="7814458197256864873">&amp;Copia</translation>
<translation id="3889424535448813030">Freccia destra</translation>
+<translation id="7135556860107312402">Consenti notifiche da:</translation>
<translation id="1398853756734560583">Ingrandisci</translation>
+<translation id="4250229828105606438">Screenshot</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Seleziona &amp;tutto</translation>
<translation id="2168039046890040389">Pagina su</translation>
+<translation id="4927753642311223124">Nessuna notifica.</translation>
<translation id="2482878487686419369">Notifiche</translation>
<translation id="3183922693828471536">Scorri fino a qui</translation>
<translation id="4552416320897244156">PGGIÙ</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Scorri a destra</translation>
<translation id="2666092431469916601">In alto</translation>
<translation id="8331626408530291785">Scorri verso l'alto</translation>
+<translation id="4773379706300191099">Disattiva notifiche da <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Apri file</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Scorri verso il basso</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Chiudi</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Non ci sono notifiche. Puoi rilassarti.</translation>
<translation id="7457942297256758195">Cancella tutto</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Notifiche</translation>
<translation id="8400147561352026160">Maiusc+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_iw.xtb b/ui/base/strings/ui_strings_iw.xtb
index cf6bddc56f..14ab8cfcd8 100644
--- a/ui/base/strings/ui_strings_iw.xtb
+++ b/ui/base/strings/ui_strings_iw.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">קצה ימני</translation>
-<translation id="5182671122927417841">השבת את התוסף</translation>
<translation id="932327136139879170">בית</translation>
<translation id="3909791450649380159">גז&amp;ור</translation>
<translation id="688711909580084195">דף אינטרנט ללא כותרת</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">דף למטה</translation>
<translation id="5329858601952122676">&amp;מחק</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB‏</translation>
-<translation id="6489863328574614542">הגדר הרשאות עבור התראות ליישומים ותוספים</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">הגדרות</translation>
<translation id="2497284189126895209">כל הקבצים</translation>
<translation id="7814458197256864873">&amp;העתק</translation>
<translation id="3889424535448813030">חץ לימין</translation>
+<translation id="7135556860107312402">אפשר התראות ממקורות אלה:</translation>
<translation id="1398853756734560583">הגדל</translation>
+<translation id="4250229828105606438">צילום מסך</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">בחר &amp;הכל</translation>
<translation id="2168039046890040389">דף למעלה</translation>
+<translation id="4927753642311223124">אין התראות להצגה, המשך הלאה.</translation>
<translation id="2482878487686419369">התראות</translation>
<translation id="3183922693828471536">גלול ל'כאן'</translation>
<translation id="4552416320897244156">דף למטה</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">גלול ימינה</translation>
<translation id="2666092431469916601">למעלה</translation>
<translation id="8331626408530291785">גלול למעלה</translation>
+<translation id="4773379706300191099">השבת התראות מהתוסף <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">פתח קובץ</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">גלול למטה</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">סגור</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">אין לך התראות. הכל רגוע!</translation>
<translation id="7457942297256758195">נקה הכל</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - התראות</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ja.xtb b/ui/base/strings/ui_strings_ja.xtb
index 14ea5d18b2..399e2c5f58 100644
--- a/ui/base/strings/ui_strings_ja.xtb
+++ b/ui/base/strings/ui_strings_ja.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/秒</translation>
<translation id="3990502903496589789">右端</translation>
-<translation id="5182671122927417841">拡張機能を無効にする</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">切り取り(&amp;T)</translation>
<translation id="688711909580084195">無題のウェブページ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">次のページへ</translation>
<translation id="5329858601952122676">削除(&amp;D)</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">アプリと拡張機能の通知権限を設定</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">設定</translation>
<translation id="2497284189126895209">すべてのファイル</translation>
<translation id="7814458197256864873">コピー(&amp;C)</translation>
<translation id="3889424535448813030">右矢印キー</translation>
+<translation id="7135556860107312402">次の通知を許可:</translation>
<translation id="1398853756734560583">最大化</translation>
+<translation id="4250229828105606438">スクリーンショット</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">すべて選択(&amp;A)</translation>
<translation id="2168039046890040389">前のページへ</translation>
+<translation id="4927753642311223124">表示する通知はありません。続行してください。</translation>
<translation id="2482878487686419369">通知</translation>
<translation id="3183922693828471536">ここまでスクロール</translation>
<translation id="4552416320897244156">PageDown</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">右にスクロール</translation>
<translation id="2666092431469916601">一番上</translation>
<translation id="8331626408530291785">上にスクロール</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> の通知を無効にする</translation>
<translation id="7907591526440419938">ファイルを開く</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">下にスクロール</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/秒</translation>
<translation id="6040143037577758943">閉じる</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/秒</translation>
-<translation id="477782898153505579">通知はありません。</translation>
<translation id="7457942297256758195">すべて消去</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - 通知</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_kn.xtb b/ui/base/strings/ui_strings_kn.xtb
index 254a773e41..6158260e73 100644
--- a/ui/base/strings/ui_strings_kn.xtb
+++ b/ui/base/strings/ui_strings_kn.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">ಬಲ ತುದಿ</translation>
-<translation id="5182671122927417841">ವಿಸ್ತರಣೆಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation>
<translation id="932327136139879170">ಮುಖಪುಟ</translation>
<translation id="3909791450649380159">ಕತ್ತರಿ&amp;ಸು</translation>
<translation id="688711909580084195">ಶೀರ್ಷಿಕೆರಹಿತ ವೆಬ್‌ಪುಟ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">ಪುಟ ಕೆಳಗೆ</translation>
<translation id="5329858601952122676">&amp;ಅಳಿಸು</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಹಾಗೂ ವಿಸ್ತರಣೆಗಳಿಗಾಗಿ ಅಧಿಸೂಚನೆಯ ಅನುಮತಿಗಳನ್ನು ಹೊಂದಿಸಿ</translation>
<translation id="6659594942844771486">ಟ್ಯಾಬ್</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">ಸೆಟ್ಟಿಂಗ್‌ಗಳು</translation>
<translation id="2497284189126895209">ಎಲ್ಲ ಫೈಲ್‌ಗಳು</translation>
<translation id="7814458197256864873">&amp;ನಕಲಿಸಿ</translation>
<translation id="3889424535448813030">ಬಲ ಬಾಣದ ಗುರುತು</translation>
+<translation id="7135556860107312402">ಕೆಳಗಿನವುಗಳಿಂದ ಅಧಿಸೂಚನೆಗಳನ್ನು ಅನುಮತಿಸಿ:</translation>
<translation id="1398853756734560583">ಗರಿಷ್ಠಗೊಳಿಸು</translation>
+<translation id="4250229828105606438">ಸ್ಕ್ರೀನ್‌ಶಾಟ್</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;ಎಲ್ಲ ಆಯ್ಕೆ ಮಾಡಿ</translation>
<translation id="2168039046890040389">ಪುಟ ಮೇಲೆ</translation>
+<translation id="4927753642311223124">ಇಲ್ಲಿ ನೋಡಲು ಏನೂ ಇಲ್ಲ, ಮುಂದೆ ಸಾಗಿ.</translation>
<translation id="2482878487686419369">ಸೂಚನೆಗಳು</translation>
<translation id="3183922693828471536">ಇಲ್ಲಿಗೆ ಸ್ಕ್ರೋಲ್ ಮಾಡಿ</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">ಬಲಕ್ಕೆ ಸ್ಕ್ರೋಲ್ ಮಾಡಿ</translation>
<translation id="2666092431469916601">ಮೇಲೆ</translation>
<translation id="8331626408530291785">ಮೇಲೆ ಸ್ಕ್ರೋಲ್ ಮಾಡು</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> ನಿಂದ ಅಧಿಸೂಚನೆಗಳನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation>
<translation id="7907591526440419938">ಫೈಲ್ ತೆರೆಯಿರಿ</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">ಕೆಳಗೆ ಸ್ಕ್ರೋಲ್ ಮಾಡು</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">ಮುಚ್ಚು</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">ನೀವು ಯಾವುದೇ ಅಧಿಸೂಚನೆಗಳನ್ನು ಹೊಂದಿಲ್ಲ. ವಿರಮಿಸಿ!</translation>
<translation id="7457942297256758195">ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - ಅಧಿಸೂಚನೆಗಳು</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ko.xtb b/ui/base/strings/ui_strings_ko.xtb
index ac14cbc530..005ce55d36 100644
--- a/ui/base/strings/ui_strings_ko.xtb
+++ b/ui/base/strings/ui_strings_ko.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/>B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/>MB/초</translation>
<translation id="3990502903496589789">오른쪽 모서리</translation>
-<translation id="5182671122927417841">확장 프로그램 사용 중지</translation>
<translation id="932327136139879170">홈</translation>
<translation id="3909791450649380159">잘라내기(&amp;T)</translation>
<translation id="688711909580084195">제목 없는 웹페이지</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">페이지 아래로</translation>
<translation id="5329858601952122676">삭제(&amp;D)</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/>KB</translation>
-<translation id="6489863328574614542">앱 및 확장 프로그램에 대한 알림 설정</translation>
<translation id="6659594942844771486">탭</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/>MB</translation>
<translation id="8428213095426709021">설정</translation>
<translation id="2497284189126895209">모든 파일</translation>
<translation id="7814458197256864873">복사(&amp;C)</translation>
<translation id="3889424535448813030">오른쪽 화살표</translation>
+<translation id="7135556860107312402">다음 항목에 알림 허용:</translation>
<translation id="1398853756734560583">최대화</translation>
+<translation id="4250229828105606438">캡처화면</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/>GB</translation>
<translation id="1901303067676059328">전체 선택(&amp;A)</translation>
<translation id="2168039046890040389">페이지 위로</translation>
+<translation id="4927753642311223124">표시할 내용이 없습니다.</translation>
<translation id="2482878487686419369">알림</translation>
<translation id="3183922693828471536">여기로 스크롤</translation>
<translation id="4552416320897244156">PageDown</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">오른쪽 스크롤</translation>
<translation id="2666092431469916601">맨 위</translation>
<translation id="8331626408530291785">위로 스크롤</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> 알림 사용 안함</translation>
<translation id="7907591526440419938">파일 열기</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">아래로 스크롤</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/>TB/s</translation>
<translation id="6040143037577758943">닫기</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/>B/s</translation>
-<translation id="477782898153505579">알림이 없습니다.</translation>
<translation id="7457942297256758195">모두 지우기</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - 알림</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_lt.xtb b/ui/base/strings/ui_strings_lt.xtb
index 7edca69b54..8b25870ca7 100644
--- a/ui/base/strings/ui_strings_lt.xtb
+++ b/ui/base/strings/ui_strings_lt.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Dešinysis kraštas</translation>
-<translation id="5182671122927417841">Neleisti plėtinio</translation>
<translation id="932327136139879170">Pradžia</translation>
<translation id="3909791450649380159">Iškir&amp;pti</translation>
<translation id="688711909580084195">Tinklalapis be pavadinimo</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Puslapį žemyn</translation>
<translation id="5329858601952122676">&amp;Pašalinti</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Nustatykite programų ir plėtinių pranešimų leidimus</translation>
<translation id="6659594942844771486">Skirtukas</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Nustatymai</translation>
<translation id="2497284189126895209">Visi failai</translation>
<translation id="7814458197256864873">&amp;Kopijuoti</translation>
<translation id="3889424535448813030">Rodyklė į dešinę</translation>
+<translation id="7135556860107312402">Leisti pranešimus iš šių plėtinių:</translation>
<translation id="1398853756734560583">Išskleisti</translation>
+<translation id="4250229828105606438">Ekrano kopija</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Pasirinkti &amp;viską</translation>
<translation id="2168039046890040389">Puslapį į viršų</translation>
+<translation id="4927753642311223124">Čia nieko nėra, slinkite toliau.</translation>
<translation id="2482878487686419369">Pranešimai</translation>
<translation id="3183922693828471536">Slinkti iki čia</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Slinkti į dešinę</translation>
<translation id="2666092431469916601">Į viršų</translation>
<translation id="8331626408530291785">Slinkti į viršų</translation>
+<translation id="4773379706300191099">Neleisti „<ph name="EXTENSION_NAME"/>“ pranešimų.</translation>
<translation id="7907591526440419938">Atidaryti failą</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Slinkti žemyn</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Uždaryti</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Negavote pranešimų. Atsipalaiduokite!</translation>
<translation id="7457942297256758195">Išvalyti viską</translation>
<translation id="7509316384504965641">„<ph name="PRODUCT"/>“ – pranešimai</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_lv.xtb b/ui/base/strings/ui_strings_lv.xtb
index b00b30f3f5..229d18db26 100644
--- a/ui/base/strings/ui_strings_lv.xtb
+++ b/ui/base/strings/ui_strings_lv.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Labā puse</translation>
-<translation id="5182671122927417841">Atspējot paplašinājumu</translation>
<translation id="932327136139879170">Sākumvieta</translation>
<translation id="3909791450649380159">Izgrie&amp;zt</translation>
<translation id="688711909580084195">Tīmekļa lapa bez nosaukuma</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Lejup</translation>
<translation id="5329858601952122676">Dzēst</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Iestatiet paziņojumu atļaujas lietotnēm un paplašinājumiem</translation>
<translation id="6659594942844771486">Cilne</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Iestatījumi</translation>
<translation id="2497284189126895209">Visi faili</translation>
<translation id="7814458197256864873">Ko&amp;pēt</translation>
<translation id="3889424535448813030">Labā bulta</translation>
+<translation id="7135556860107312402">Atļaut paziņojumu saņemšanu no:</translation>
<translation id="1398853756734560583">Maksimizēt</translation>
+<translation id="4250229828105606438">Ekrānuzņēmums</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Izvēlēties visus</translation>
<translation id="2168039046890040389">Augšup</translation>
+<translation id="4927753642311223124">Te nekā nav, varat doties tālāk!</translation>
<translation id="2482878487686419369">Paziņojumi</translation>
<translation id="3183922693828471536">Ritināt šeit</translation>
<translation id="4552416320897244156">Lejup</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Ritināt pa labi</translation>
<translation id="2666092431469916601">Augša</translation>
<translation id="8331626408530291785">Ritināt augšup</translation>
+<translation id="4773379706300191099">Atspējot paziņojumu saņemšanu no: <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Atvērt failu</translation>
<translation id="1293699935367580298">Atsolis</translation>
<translation id="815598010540052116">Ritināt lejup</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Aizvērt</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Jums nav neviena paziņojuma. Atpūtieties!</translation>
<translation id="7457942297256758195">Notīrīt visu</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> — paziņojumi</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ml.xtb b/ui/base/strings/ui_strings_ml.xtb
index 8a082c8364..ec4b3427d4 100644
--- a/ui/base/strings/ui_strings_ml.xtb
+++ b/ui/base/strings/ui_strings_ml.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">വലത് അഗ്രം</translation>
-<translation id="5182671122927417841">വിപുലീകരണം അപ്രാപ്‌തമാക്കുക</translation>
<translation id="932327136139879170">ഹോം</translation>
<translation id="3909791450649380159">&amp;മുറിക്കുക</translation>
<translation id="688711909580084195">ശീർഷകമില്ലാത്ത വെബ്‌പേജ്</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">താഴെയുള്ള പേജുകള്‍</translation>
<translation id="5329858601952122676">&amp;ഇല്ലാതാക്കൂ</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">അപ്ലിക്കേഷനുകൾക്കും വിപുലീകരണങ്ങൾക്കുമായുള്ള അറിയിപ്പ് അനുമതികൾ സജ്ജീകരിക്കുക</translation>
<translation id="6659594942844771486">ടാബ്</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">ക്രമീകരണങ്ങള്‍</translation>
<translation id="2497284189126895209">എല്ലാ ഫയലുകളും</translation>
<translation id="7814458197256864873">&amp;പകര്‍ത്തൂ</translation>
<translation id="3889424535448813030">വലതുഭാഗത്തെ അമ്പടയാളം</translation>
+<translation id="7135556860107312402">ഇനിപ്പറയുന്നതിൽ നിന്നുള്ള അറിയിപ്പുകൾ അനുവദിക്കുക:</translation>
<translation id="1398853756734560583">വലുതാക്കുക</translation>
+<translation id="4250229828105606438">സ്‌ക്രീൻഷോട്ട്</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">എല്ലാം &amp;തിരഞ്ഞെടുക്കൂ</translation>
<translation id="2168039046890040389">പേജ് മുകളിലേയ്ക്ക്</translation>
+<translation id="4927753642311223124">ഇവിടെ കാണുന്നതിനായി ഒന്നുമില്ല, തുടരുക.</translation>
<translation id="2482878487686419369">വിജ്ഞാപനങ്ങള്‍‌</translation>
<translation id="3183922693828471536">ഇവിടെ സ്ക്രോള്‍ ചെയ്യുക</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">വലത്തോട്ട് സ്ക്രോള്‍ ചെയ്യുക</translation>
<translation id="2666092431469916601">മുകളിലേക്ക്</translation>
<translation id="8331626408530291785">മുകളിലേക്ക് സ്ക്രോള്‍ ചെയ്യൂ</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> എന്നതിൽ നിന്നുള്ള അറിയിപ്പുകൾ പ്രവർത്തനരഹിതമാക്കുക</translation>
<translation id="7907591526440419938">ഫയല്‍ തുറക്കുക</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">താഴേക്ക് സ്ക്രോള്‍ചെയ്യൂ</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">അടയ്ക്കുക</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">നിങ്ങൾക്ക് അറിയിപ്പുകൾ ഒന്നുമില്ല. സ്വസ്ഥമായിരിക്കൂ!</translation>
<translation id="7457942297256758195">എല്ലാം മായ്‌ക്കുക</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - അറിയിപ്പുകൾ</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_mr.xtb b/ui/base/strings/ui_strings_mr.xtb
index 50f1c1032b..a446012559 100644
--- a/ui/base/strings/ui_strings_mr.xtb
+++ b/ui/base/strings/ui_strings_mr.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">उजवा काठ</translation>
-<translation id="5182671122927417841">विस्तार अक्षम करा</translation>
<translation id="932327136139879170">मुख्यपृष्ठ</translation>
<translation id="3909791450649380159">क&amp;ट करा</translation>
<translation id="688711909580084195">अशीर्षकांकीत वेबपृष्‍ठ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">पृष्ठ खाली</translation>
<translation id="5329858601952122676">&amp;हटवा</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">अ‍ॅप्स आणि विस्तारांसाठी सूचना परवानग्या सेट करा</translation>
<translation id="6659594942844771486">टॅब</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">सेटिंग्ज</translation>
<translation id="2497284189126895209">सर्व फाइल</translation>
<translation id="7814458197256864873">&amp;कॉपी करा</translation>
<translation id="3889424535448813030">Right Arrow</translation>
+<translation id="7135556860107312402">खालील लोकांकडील सूचनांना अनुमत करा:</translation>
<translation id="1398853756734560583">वाढवा</translation>
+<translation id="4250229828105606438">स्क्रीनशॉट</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;सर्व निवडा</translation>
<translation id="2168039046890040389">पृष्ठ वर</translation>
+<translation id="4927753642311223124">येथे पाहण्यासाठी काही नाही, पुढे चला.</translation>
<translation id="2482878487686419369">सूचना</translation>
<translation id="3183922693828471536">येथे स्क्रोल करा</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">उजवे स्क्रोल करा</translation>
<translation id="2666092431469916601">शीर्ष</translation>
<translation id="8331626408530291785">वर स्क्रोल करा</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> वरील सूचना अक्षम करा</translation>
<translation id="7907591526440419938">फाइल उघडा</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">खाली स्क्रोल करा</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">बंद करा</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">आपल्‍याला कोणत्‍याही सूचना नाहीत. निश्चिंत व्‍हा!</translation>
<translation id="7457942297256758195">सर्व साफ करा</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - सूचना</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ms.xtb b/ui/base/strings/ui_strings_ms.xtb
index 55ef6af1d8..65cf317eb8 100644
--- a/ui/base/strings/ui_strings_ms.xtb
+++ b/ui/base/strings/ui_strings_ms.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Tepi Kanan</translation>
-<translation id="5182671122927417841">Lumpuhkan pelanjutan</translation>
<translation id="932327136139879170">Halaman Utama</translation>
<translation id="3909791450649380159">Po&amp;tong</translation>
<translation id="688711909580084195">Laman Web Tidak Bertajuk</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Ke Bawah Halaman</translation>
<translation id="5329858601952122676">&amp;Padam</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Tetapkan kebenaran pemberitahuan untuk apl dan pelanjutan</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Tetapan</translation>
<translation id="2497284189126895209">Semua Fail</translation>
<translation id="7814458197256864873">&amp;Salin</translation>
<translation id="3889424535448813030">Anak Panah Kanan</translation>
+<translation id="7135556860107312402">Benarkan pemberitahuan daripada yang berikut:</translation>
<translation id="1398853756734560583">Maksimumkan</translation>
+<translation id="4250229828105606438">Tangkapan skrin</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Pilih &amp;semua</translation>
<translation id="2168039046890040389">Halaman Ke Atas</translation>
+<translation id="4927753642311223124">Tiada apa-apa untuk dilihat di sini, teruskan.</translation>
<translation id="2482878487686419369">Pemberitahuan</translation>
<translation id="3183922693828471536">Tatal ke Sini</translation>
<translation id="4552416320897244156">BwhHlmn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Tatal ke Kanan</translation>
<translation id="2666092431469916601">Atas</translation>
<translation id="8331626408530291785">Tatal Ke Atas</translation>
+<translation id="4773379706300191099">Lumpuhkan pemberitahuan daripada <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Buka Fail</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Tatal Ke Bawah</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Tutup</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Anda tiada pemberitahuan baharu. Bertenang!</translation>
<translation id="7457942297256758195">Kosongkan Semua</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Pemberitahuan</translation>
<translation id="8400147561352026160">Anjak+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_nl.xtb b/ui/base/strings/ui_strings_nl.xtb
index 5caeb66a0a..2f4ab87ef3 100644
--- a/ui/base/strings/ui_strings_nl.xtb
+++ b/ui/base/strings/ui_strings_nl.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Rechterzijde</translation>
-<translation id="5182671122927417841">Extensie uitschakelen</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">&amp;Knippen</translation>
<translation id="688711909580084195">Naamloze webpagina</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Pagina omlaag</translation>
<translation id="5329858601952122676">Verwij&amp;deren</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Meldingsrechten instellen voor apps en extensies</translation>
<translation id="6659594942844771486">Tabblad</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Instellingen</translation>
<translation id="2497284189126895209">Alle bestanden</translation>
<translation id="7814458197256864873">&amp;Kopiëren</translation>
<translation id="3889424535448813030">Pijl-rechts</translation>
+<translation id="7135556860107312402">Meldingen toestaan van het volgende:</translation>
<translation id="1398853756734560583">Maximaliseren</translation>
+<translation id="4250229828105606438">Schermafbeelding</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;Alles selecteren</translation>
<translation id="2168039046890040389">Pagina omhoog</translation>
+<translation id="4927753642311223124">Er zijn geen meldingen.</translation>
<translation id="2482878487686419369">Meldingen</translation>
<translation id="3183922693828471536">Hiernaartoe bladeren</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Naar rechts bladeren</translation>
<translation id="2666092431469916601">Boven</translation>
<translation id="8331626408530291785">Omhoog bladeren</translation>
+<translation id="4773379706300191099">Meldingen van <ph name="EXTENSION_NAME"/> uitschakelen</translation>
<translation id="7907591526440419938">Bestand openen</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Omlaag bladeren</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Sluiten</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">U heeft geen meldingen. Doe het rustig aan!</translation>
<translation id="7457942297256758195">Alles wissen</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Meldingen</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_no.xtb b/ui/base/strings/ui_strings_no.xtb
index 7187512c82..b2fcd46035 100644
--- a/ui/base/strings/ui_strings_no.xtb
+++ b/ui/base/strings/ui_strings_no.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB per sek.</translation>
<translation id="3990502903496589789">Høyre kant</translation>
-<translation id="5182671122927417841">Deaktiver utvidelse</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Klipp u&amp;t</translation>
<translation id="688711909580084195">Nettside uten tittel</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Ned 1 s.</translation>
<translation id="5329858601952122676">&amp;Slett</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Angi varseltillatelser for apper og utvidelser</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Innstillinger</translation>
<translation id="2497284189126895209">Alle filer</translation>
<translation id="7814458197256864873">&amp;Kopier</translation>
<translation id="3889424535448813030">Pil høyre</translation>
+<translation id="7135556860107312402">Tillat varsler fra følgende:</translation>
<translation id="1398853756734560583">Maksimer</translation>
+<translation id="4250229828105606438">Skjermdump</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Marker &amp;alt</translation>
<translation id="2168039046890040389">Opp 1 s.</translation>
+<translation id="4927753642311223124">Det er ikke noe å se her. Gå videre.</translation>
<translation id="2482878487686419369">Varslinger</translation>
<translation id="3183922693828471536">Rull hit</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Rull mot høyre</translation>
<translation id="2666092431469916601">Topp</translation>
<translation id="8331626408530291785">Rull opp</translation>
+<translation id="4773379706300191099">Deaktiver varsler fra <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Åpne filen</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Rull ned</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB per sek</translation>
<translation id="6040143037577758943">Lukk</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B per sek</translation>
-<translation id="477782898153505579">Du har ikke noen varsler. Ta deg ei bolle!</translation>
<translation id="7457942297256758195">Fjern alle</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – varsler</translation>
<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_pl.xtb b/ui/base/strings/ui_strings_pl.xtb
index 18cbe551a3..bc698f99ec 100644
--- a/ui/base/strings/ui_strings_pl.xtb
+++ b/ui/base/strings/ui_strings_pl.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Krawędź po prawej</translation>
-<translation id="5182671122927417841">Wyłącz rozszerzenie</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Wy&amp;tnij</translation>
<translation id="688711909580084195">Strona internetowa bez tytułu</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Strona w dół</translation>
<translation id="5329858601952122676">&amp;Usuń</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Ustaw uprawnienia do powiadomień dla aplikacji i rozszerzeń</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Ustawienia</translation>
<translation id="2497284189126895209">Wszystkie pliki</translation>
<translation id="7814458197256864873">&amp;Kopiuj</translation>
<translation id="3889424535448813030">Strzałka w prawo</translation>
+<translation id="7135556860107312402">Zezwalaj na powiadomienia z:</translation>
<translation id="1398853756734560583">Maksymalizuj</translation>
+<translation id="4250229828105606438">Zrzut ekranu</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Zaznacz &amp;wszystko</translation>
<translation id="2168039046890040389">Strona do góry</translation>
+<translation id="4927753642311223124">Nic tu nie ma.</translation>
<translation id="2482878487686419369">Powiadomienia</translation>
<translation id="3183922693828471536">Przewiń tutaj</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Przewiń w prawo</translation>
<translation id="2666092431469916601">Do góry</translation>
<translation id="8331626408530291785">Przewiń w górę</translation>
+<translation id="4773379706300191099">Wyłącz powiadomienia z <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Otwórz plik</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Przewiń w dół</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Zamknij</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Spokojnie, nie masz żadnych powiadomień.</translation>
<translation id="7457942297256758195">Wyczyść wszystkie</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – powiadomienia</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_pt-BR.xtb b/ui/base/strings/ui_strings_pt-BR.xtb
index edd3af88c4..01b2c2605f 100644
--- a/ui/base/strings/ui_strings_pt-BR.xtb
+++ b/ui/base/strings/ui_strings_pt-BR.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> bytes</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Borda direita</translation>
-<translation id="5182671122927417841">Desativar extensão</translation>
<translation id="932327136139879170">Página inicial</translation>
<translation id="3909791450649380159">&amp;Recortar</translation>
<translation id="688711909580084195">Página da web sem título</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Página para baixo</translation>
<translation id="5329858601952122676">&amp;Excluir</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Definir permissões de notificação para aplicativos e extensões</translation>
<translation id="6659594942844771486">Guia</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Configurações</translation>
<translation id="2497284189126895209">Todos os arquivos</translation>
<translation id="7814458197256864873">Co&amp;piar</translation>
<translation id="3889424535448813030">Seta para a direita</translation>
+<translation id="7135556860107312402">Permitir as seguintes notificações:</translation>
<translation id="1398853756734560583">Maximizar</translation>
+<translation id="4250229828105606438">Captura de tela</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Selecionar &amp;tudo</translation>
<translation id="2168039046890040389">Página para cima</translation>
+<translation id="4927753642311223124">Nada para ver aqui, siga em frente.</translation>
<translation id="2482878487686419369">Notificações</translation>
<translation id="3183922693828471536">Percorrer até aqui</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Percorrer à direita</translation>
<translation id="2666092431469916601">Parte superior</translation>
<translation id="8331626408530291785">Percorrer para cima</translation>
+<translation id="4773379706300191099">Desativar notificações de <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Abrir arquivo</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Percorrer para baixo</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Fechar</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Você não tem notificações. Relaxe!</translation>
<translation id="7457942297256758195">Limpar tudo</translation>
<translation id="7509316384504965641">Notificações do <ph name="PRODUCT"/></translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_pt-PT.xtb b/ui/base/strings/ui_strings_pt-PT.xtb
index b8bd3848c5..4f6fff3346 100644
--- a/ui/base/strings/ui_strings_pt-PT.xtb
+++ b/ui/base/strings/ui_strings_pt-PT.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Margem direita</translation>
-<translation id="5182671122927417841">Desativar extensão</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Cor&amp;tar</translation>
<translation id="688711909580084195">Página Web Sem Nome</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Página para baixo</translation>
<translation id="5329858601952122676">E&amp;liminar</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Definir permissões de notificação para aplicações e extensões</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Definições</translation>
<translation id="2497284189126895209">Todos os ficheiros</translation>
<translation id="7814458197256864873">&amp;Copiar</translation>
<translation id="3889424535448813030">Seta para a direita</translation>
+<translation id="7135556860107312402">Permitir notificações de:</translation>
<translation id="1398853756734560583">Maximizar</translation>
+<translation id="4250229828105606438">Captura de ecrã</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Seleccion&amp;ar tudo</translation>
<translation id="2168039046890040389">Página para cima</translation>
+<translation id="4927753642311223124">Nada de novo a apresentar por aqui.</translation>
<translation id="2482878487686419369">Notificações</translation>
<translation id="3183922693828471536">Deslocar-se para aqui</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Deslocar-se para a direita</translation>
<translation id="2666092431469916601">Parte superior</translation>
<translation id="8331626408530291785">Deslocar-se para cima</translation>
+<translation id="4773379706300191099">Desativar notificações de <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Abrir ficheiro</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Deslocar-se para baixo</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Fechar</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Não existem notificações. Relaxe!</translation>
<translation id="7457942297256758195">Limpar Tudo</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Notificações</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ro.xtb b/ui/base/strings/ui_strings_ro.xtb
index 52c1c257fc..b1ecdaaa34 100644
--- a/ui/base/strings/ui_strings_ro.xtb
+++ b/ui/base/strings/ui_strings_ro.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> O</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MO/s</translation>
<translation id="3990502903496589789">Marginea dreaptă</translation>
-<translation id="5182671122927417841">Dezactivați extensiile</translation>
<translation id="932327136139879170">Pagina de pornire</translation>
<translation id="3909791450649380159">&amp;Decupați</translation>
<translation id="688711909580084195">Pagină web fără titlu</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down (o pagină mai jos)</translation>
<translation id="5329858601952122676">Ș&amp;tergeți</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KO</translation>
-<translation id="6489863328574614542">Setați permisiunile privind notificările pentru aplicații și extensii</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MO</translation>
<translation id="8428213095426709021">Setări</translation>
<translation id="2497284189126895209">Toate fișierele</translation>
<translation id="7814458197256864873">&amp;Copiați</translation>
<translation id="3889424535448813030">Săgeata spre dreapta</translation>
+<translation id="7135556860107312402">Permiteți notificările de la următoarele:</translation>
<translation id="1398853756734560583">Maximizați</translation>
+<translation id="4250229828105606438">Captură de ecran</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GO</translation>
<translation id="1901303067676059328">Select&amp;ați tot</translation>
<translation id="2168039046890040389">O pagină mai sus</translation>
+<translation id="4927753642311223124">Nimic de văzut aici, treceți mai departe.</translation>
<translation id="2482878487686419369">Notificări</translation>
<translation id="3183922693828471536">Derulați până aici</translation>
<translation id="4552416320897244156">PgDwn (o pagină mai jos)</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Derulați spre dreapta</translation>
<translation id="2666092431469916601">Sus</translation>
<translation id="8331626408530291785">Derulați în sus</translation>
+<translation id="4773379706300191099">Dezactivați notificările de la <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Deschideți fișierul</translation>
<translation id="1293699935367580298">Esc (Ieșiți)</translation>
<translation id="815598010540052116">Derulați în jos</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TO/s</translation>
<translation id="6040143037577758943">Închideți</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> O/s</translation>
-<translation id="477782898153505579">Nu aveți notificări. Relaxați-vă!</translation>
<translation id="7457942297256758195">Ștergeți-le pe toate</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Notificări</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ru.xtb b/ui/base/strings/ui_strings_ru.xtb
index 1454fb3e67..2018963150 100644
--- a/ui/base/strings/ui_strings_ru.xtb
+++ b/ui/base/strings/ui_strings_ru.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> Б</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> МБ/с</translation>
<translation id="3990502903496589789">Правый край</translation>
-<translation id="5182671122927417841">Отключить расширение</translation>
<translation id="932327136139879170">На главную</translation>
<translation id="3909791450649380159">Выре&amp;зать</translation>
<translation id="688711909580084195">Страница без названия</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Прокрутка вниз</translation>
<translation id="5329858601952122676">&amp;Удалить</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> КБ</translation>
-<translation id="6489863328574614542">Настройка оповещений для приложений и расширений</translation>
<translation id="6659594942844771486">Вкладка</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> МБ</translation>
<translation id="8428213095426709021">Настройки</translation>
<translation id="2497284189126895209">Все файлы</translation>
<translation id="7814458197256864873">&amp;Копировать</translation>
<translation id="3889424535448813030">Стрелка вправо</translation>
+<translation id="7135556860107312402">Разрешить оповещения от:</translation>
<translation id="1398853756734560583">Развернуть</translation>
+<translation id="4250229828105606438">Скриншот</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> ГБ</translation>
<translation id="1901303067676059328">Выделить &amp;все</translation>
<translation id="2168039046890040389">Вверх</translation>
+<translation id="4927753642311223124">Оповещений нет.</translation>
<translation id="2482878487686419369">Оповещения</translation>
<translation id="3183922693828471536">Прокрутить до этого места</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Прокрутка вправо</translation>
<translation id="2666092431469916601">Наверх</translation>
<translation id="8331626408530291785">Прокрутка вверх</translation>
+<translation id="4773379706300191099">Отключить оповещения от <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Открытие файла</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Прокрутка вниз</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> ТБ/с</translation>
<translation id="6040143037577758943">Закрыть</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> Б/с</translation>
-<translation id="477782898153505579">Новых оповещений нет.</translation>
<translation id="7457942297256758195">Очистить все</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Оповещения</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_sk.xtb b/ui/base/strings/ui_strings_sk.xtb
index d4bdd0dc16..75f4c5ff72 100644
--- a/ui/base/strings/ui_strings_sk.xtb
+++ b/ui/base/strings/ui_strings_sk.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Pravý okraj</translation>
-<translation id="5182671122927417841">Zakázať rozšírenie</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">&amp;Vystrihnúť</translation>
<translation id="688711909580084195">Nepomenovaná webová stránka</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Stránkovať nadol</translation>
<translation id="5329858601952122676">&amp;Odstrániť</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Nastaviť povolenia upozornení pre aplikácie a rozšírenia</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Nastavenia</translation>
<translation id="2497284189126895209">Všetky súbory</translation>
<translation id="7814458197256864873">&amp;Kopírovať</translation>
<translation id="3889424535448813030">Šípka doprava</translation>
+<translation id="7135556860107312402">Povoliť prijímanie upozornení od:</translation>
<translation id="1398853756734560583">Maximalizovať</translation>
+<translation id="4250229828105606438">Snímka obrazovky</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Vybrať &amp;všetko</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Tu sa nič nenachádza, pokračujte ďalej.</translation>
<translation id="2482878487686419369">Upozornenia</translation>
<translation id="3183922693828471536">Rolovať na toto miesto</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Rolovať doprava</translation>
<translation id="2666092431469916601">Vrch</translation>
<translation id="8331626408530291785">Rolovať nahor</translation>
+<translation id="4773379706300191099">Vypnúť prijímanie upozornení od rozšírenia <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Otvoriť súbor</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Rolovať nadol</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Zatvoriť</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">V pohode, nemáte žiadne upozornenia.</translation>
<translation id="7457942297256758195">Vymazať všetky</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – upozornenia</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_sl.xtb b/ui/base/strings/ui_strings_sl.xtb
index 122201b580..2ef0d1062b 100644
--- a/ui/base/strings/ui_strings_sl.xtb
+++ b/ui/base/strings/ui_strings_sl.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Desni rob</translation>
-<translation id="5182671122927417841">Onemogoči razširitev</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Izrež&amp;i</translation>
<translation id="688711909580084195">Spletna stran brez naslova</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Stran dol</translation>
<translation id="5329858601952122676">&amp;Izbriši</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Nastavitev dovoljenj obvestil za aplikacije in razširitve</translation>
<translation id="6659594942844771486">Tabulator</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Nastavitve</translation>
<translation id="2497284189126895209">Vse datoteke</translation>
<translation id="7814458197256864873">&amp;Kopiraj</translation>
<translation id="3889424535448813030">Puščica desno</translation>
+<translation id="7135556860107312402">Omogočanje obvestil teh aplikacij:</translation>
<translation id="1398853756734560583">Povečaj</translation>
+<translation id="4250229828105606438">Posnetek zaslona</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Izberi &amp;vse</translation>
<translation id="2168039046890040389">Stran gor</translation>
+<translation id="4927753642311223124">Tu ni ničesar, pomaknite se naprej.</translation>
<translation id="2482878487686419369">Obvestila</translation>
<translation id="3183922693828471536">Pomik do sem</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Pomik desno</translation>
<translation id="2666092431469916601">Na vrh</translation>
<translation id="8331626408530291785">Pomik gor</translation>
+<translation id="4773379706300191099">Onemogoči obvestila aplikacije <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Odpri datoteko</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Pomik dol</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Zapri</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Ni novih obvestil. Brez skrbi!</translation>
<translation id="7457942297256758195">Izbriši vse</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – obvestila</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_sr.xtb b/ui/base/strings/ui_strings_sr.xtb
index a356461268..2d30c21ee6 100644
--- a/ui/base/strings/ui_strings_sr.xtb
+++ b/ui/base/strings/ui_strings_sr.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Десна ивица</translation>
-<translation id="5182671122927417841">Онемогући додатак</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Ис&amp;еци</translation>
<translation id="688711909580084195">Веб-страница без наслова</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Страница надоле</translation>
<translation id="5329858601952122676">&amp;Избриши</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Подешавање дозвола за обавештења за апликације и додатке</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Подешавања</translation>
<translation id="2497284189126895209">Све датотеке</translation>
<translation id="7814458197256864873">&amp;Копирај</translation>
<translation id="3889424535448813030">Стрелица надесно</translation>
+<translation id="7135556860107312402">Дозволи обавештења из следећих извора:</translation>
<translation id="1398853756734560583">Увећај</translation>
+<translation id="4250229828105606438">Снимак екрана</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Изабери &amp;све</translation>
<translation id="2168039046890040389">Страница нагоре</translation>
+<translation id="4927753642311223124">Нема шта да се види овде. Наставите даље.</translation>
<translation id="2482878487686419369">Обавештења</translation>
<translation id="3183922693828471536">Помери се овде</translation>
<translation id="4552416320897244156">Page Down</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Помери надесно</translation>
<translation id="2666092431469916601">Врх</translation>
<translation id="8331626408530291785">Помери нагоре</translation>
+<translation id="4773379706300191099">Онемогући обавештења из додатка <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Отварање датотеке</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Помери надоле</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Затвори</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Немате обавештења. Опустите се!</translation>
<translation id="7457942297256758195">Обриши све</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Обавештења</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_sv.xtb b/ui/base/strings/ui_strings_sv.xtb
index 94ce5f5401..93259ef58a 100644
--- a/ui/base/strings/ui_strings_sv.xtb
+++ b/ui/base/strings/ui_strings_sv.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sek</translation>
<translation id="3990502903496589789">Högerkant</translation>
-<translation id="5182671122927417841">Inaktivera tillägg</translation>
<translation id="932327136139879170">Startsida</translation>
<translation id="3909791450649380159">&amp;Klipp ut</translation>
<translation id="688711909580084195">Namnlös webbsida</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Ta bort</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation>
-<translation id="6489863328574614542">Ange meddelandebehörighet för appar och tillägg</translation>
<translation id="6659594942844771486">Flik</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Inställningar</translation>
<translation id="2497284189126895209">Alla filer</translation>
<translation id="7814458197256864873">&amp;Kopiera</translation>
<translation id="3889424535448813030">Högerpil</translation>
+<translation id="7135556860107312402">Tillåt meddelanden från följande:</translation>
<translation id="1398853756734560583">Maximera</translation>
+<translation id="4250229828105606438">Skärmdump</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Välj &amp;alla</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Här finns inget att se, fortsätt.</translation>
<translation id="2482878487686419369">Aviseringar</translation>
<translation id="3183922693828471536">Rulla hit</translation>
<translation id="4552416320897244156">Page Down</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Rulla åt höger</translation>
<translation id="2666092431469916601">Överst</translation>
<translation id="8331626408530291785">Rulla uppåt</translation>
+<translation id="4773379706300191099">Inaktivera meddelanden från <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Öppna fil</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Rulla nedåt</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sek</translation>
<translation id="6040143037577758943">Stäng</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sek</translation>
-<translation id="477782898153505579">Ta det lugnt! Du har inga meddelanden.</translation>
<translation id="7457942297256758195">Ta bort alla</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – meddelanden</translation>
<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_sw.xtb b/ui/base/strings/ui_strings_sw.xtb
index ba4b415833..a620b51efe 100644
--- a/ui/base/strings/ui_strings_sw.xtb
+++ b/ui/base/strings/ui_strings_sw.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658">B <ph name="QUANTITY"/></translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">Ncha ya Kulia</translation>
-<translation id="5182671122927417841">Lemaza kiendelezi</translation>
<translation id="932327136139879170">Nyumbani</translation>
<translation id="3909791450649380159">&amp;Kata</translation>
<translation id="688711909580084195">Ukurasa wa Wavuti usio na Kichwa</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Ukurasa mmoja chini</translation>
<translation id="5329858601952122676">&amp;Futa</translation>
<translation id="8901569739625249689">KB <ph name="QUANTITY"/></translation>
-<translation id="6489863328574614542">Weka arifa za idhini za programu na viendelezi</translation>
<translation id="6659594942844771486">Kichupo</translation>
<translation id="3049748772180311791">MB <ph name="QUANTITY"/></translation>
<translation id="8428213095426709021">Mipangilio</translation>
<translation id="2497284189126895209">Faili zote</translation>
<translation id="7814458197256864873">&amp;Nakili</translation>
<translation id="3889424535448813030">Mshale Kulia</translation>
+<translation id="7135556860107312402">Ruhusu arifa kutoka kwa:</translation>
<translation id="1398853756734560583">Tanua</translation>
+<translation id="4250229828105606438">Picha ya skrini</translation>
<translation id="3757388668994797779">GB <ph name="QUANTITY"/></translation>
<translation id="1901303067676059328">Chagua &amp;yote</translation>
<translation id="2168039046890040389">Ukurasa mmoja juu</translation>
+<translation id="4927753642311223124">Hakuna cha kuangalia hapa, endelea.</translation>
<translation id="2482878487686419369">Arifa</translation>
<translation id="3183922693828471536">Vingirisha Hadi Hapa</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Vingirisha Kulia</translation>
<translation id="2666092431469916601">Ya Juu</translation>
<translation id="8331626408530291785">Vingirisha Juu</translation>
+<translation id="4773379706300191099">Zima arifa kutoka <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Fungua Faili</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Vingirisha Chini</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">Funga</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">Huna arifa zozote. Tulia!</translation>
<translation id="7457942297256758195">Futa Zote</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Arifa</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_ta.xtb b/ui/base/strings/ui_strings_ta.xtb
index 4800de77e9..b4c3c96380 100644
--- a/ui/base/strings/ui_strings_ta.xtb
+++ b/ui/base/strings/ui_strings_ta.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> பை</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> மெ.பை/வி</translation>
<translation id="3990502903496589789">வலது விளிம்பு</translation>
-<translation id="5182671122927417841">நீட்டிப்பை முடக்கு</translation>
<translation id="932327136139879170">முகப்பு</translation>
<translation id="3909791450649380159">வெட்&amp;டு</translation>
<translation id="688711909580084195">தலைப்பிடாத வலைப்பக்கம்</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">பக்கத்தின் கீழே</translation>
<translation id="5329858601952122676">&amp;நீக்கு</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> கி.பை.</translation>
-<translation id="6489863328574614542">பயன்பாடுகள் மற்றும் நீட்டிப்புகளுக்கான அறிவிப்பு அனுமதிகளை அமைக்கவும்</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> மெ.பை</translation>
<translation id="8428213095426709021">அமைப்புகள்</translation>
<translation id="2497284189126895209">அனைத்து கோப்புகளும்</translation>
<translation id="7814458197256864873">&amp;நகலெடு</translation>
<translation id="3889424535448813030">வலது அம்பு</translation>
+<translation id="7135556860107312402">பின்வருபவற்றிலிருந்து வரும் அறிவிப்புகளை அனுமதி:</translation>
<translation id="1398853756734560583">பெரிதாக்கு</translation>
+<translation id="4250229828105606438">ஸ்கிரீன் ஷாட்</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">அ&amp;னைத்தையும் தேர்ந்தெடு</translation>
<translation id="2168039046890040389">பக்கத்தின் மேலே</translation>
+<translation id="4927753642311223124">பார்க்க இங்கு எதுவுமில்லை, தொடரவும்.</translation>
<translation id="2482878487686419369">அறிவிக்கைகள்</translation>
<translation id="3183922693828471536">இங்கே உருட்டு</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">வலப்புறம் உருட்டு</translation>
<translation id="2666092431469916601">மேலே</translation>
<translation id="8331626408530291785">மேலே உருட்டு</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> இலிருந்து வரும் அறிவிப்புகளை முடக்கு</translation>
<translation id="7907591526440419938">கோப்பைத் திற</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">கீழே உருட்டு</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> டெ.பை/வி</translation>
<translation id="6040143037577758943">மூடு</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> பை/வி</translation>
-<translation id="477782898153505579">உங்களுக்கு அறிவிப்புகள் எதுவுமில்லை. ஓய்வெடுக்கலாம்!</translation>
<translation id="7457942297256758195">அனைத்தையும் அழி</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - அறிவிப்புகள்</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_te.xtb b/ui/base/strings/ui_strings_te.xtb
index 949ea6f407..304f8c8644 100644
--- a/ui/base/strings/ui_strings_te.xtb
+++ b/ui/base/strings/ui_strings_te.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">కుడి సరిహద్దు</translation>
-<translation id="5182671122927417841">పొడిగింపును నిలిపివేయి</translation>
<translation id="932327136139879170">హోమ్</translation>
<translation id="3909791450649380159">క&amp;త్తిరించు</translation>
<translation id="688711909580084195">శీర్షికలేని వెబ్‌పేజీ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">పేజీ క్రిందికి</translation>
<translation id="5329858601952122676">&amp;తొలగించు</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">అనువర్తనాలు మరియు పొడిగింపులకు నోటిఫికేషన్ అనుమతులను సెట్ చేయండి</translation>
<translation id="6659594942844771486">టాబ్</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">సెట్టింగ్‌లు</translation>
<translation id="2497284189126895209">మొత్తం ఫైళ్లు</translation>
<translation id="7814458197256864873">&amp;కాపీ</translation>
<translation id="3889424535448813030">కుడి బాణం</translation>
+<translation id="7135556860107312402">వీటి నుండి నోటిఫికేషన్‌లను అనుమతించు:</translation>
<translation id="1398853756734560583">గరిష్ఠీకరించు</translation>
+<translation id="4250229828105606438">స్క్రీన్‌షాట్</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">&amp;అన్నీ ఎంచుకోండి</translation>
<translation id="2168039046890040389">పేజీ పైకి</translation>
+<translation id="4927753642311223124">ఇక్కడ చూడటానికి ఏమీ లేదు, కొనసాగండి.</translation>
<translation id="2482878487686419369">ప్రకటనలు</translation>
<translation id="3183922693828471536">ఇక్కడ స్క్రోల్ చెయ్యండి</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">కుడికి స్క్రోల్ చెయ్యి</translation>
<translation id="2666092431469916601">పైన</translation>
<translation id="8331626408530291785">పైకి స్క్రోల్ చెయ్యి</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> నుండి నోటిఫికేషన్‌లను నిలిపివేయి</translation>
<translation id="7907591526440419938">ఫైల్‌ను తెరువు</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">క్రిందికి స్క్రోల్ చేయి</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">మూసివేయి</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">మీకు నోటిఫికేషన్‌లు లేవు. విశ్రమించండి!</translation>
<translation id="7457942297256758195">అన్నీ క్లియర్ చేయి</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - నోటిఫికేషన్‌లు</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_th.xtb b/ui/base/strings/ui_strings_th.xtb
index daddfc79e1..9b35e7446e 100644
--- a/ui/base/strings/ui_strings_th.xtb
+++ b/ui/base/strings/ui_strings_th.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/วินาที</translation>
<translation id="3990502903496589789">ขอบขวา</translation>
-<translation id="5182671122927417841">ปิดใช้งานส่วนขยาย</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">&amp;ตัด</translation>
<translation id="688711909580084195">หน้าเว็บที่ไม่มีชื่อ</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">เลื่อนหน้าลง</translation>
<translation id="5329858601952122676">&amp;ลบ</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">ตั้งค่าการอนุญาตการแจ้งเตือนสำหรับแอปและส่วนขยาย</translation>
<translation id="6659594942844771486">แท็บ</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">การตั้งค่า</translation>
<translation id="2497284189126895209">ไฟล์ทั้งหมด</translation>
<translation id="7814458197256864873">&amp;คัดลอก</translation>
<translation id="3889424535448813030">ลูกศรขวา</translation>
+<translation id="7135556860107312402">อนุญาตให้มีการแจ้งเตือนจากรายการต่อไปนี้</translation>
<translation id="1398853756734560583">ย่อ</translation>
+<translation id="4250229828105606438">ภาพหน้าจอ</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">เลือก&amp;ทั้งหมด</translation>
<translation id="2168039046890040389">เลื่อนหน้าขึ้น</translation>
+<translation id="4927753642311223124">ที่นี่ไม่มีอะไรต้องดู ไปต่อได้</translation>
<translation id="2482878487686419369">การแจ้งเตือน</translation>
<translation id="3183922693828471536">เลื่อนมาที่นี่</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">เลื่อนทางขวา</translation>
<translation id="2666092431469916601">ด้านบน</translation>
<translation id="8331626408530291785">เลื่อนขึ้น</translation>
+<translation id="4773379706300191099">ปิดการแจ้งเตือนจาก <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">เปิดไฟล์</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">เลื่อนลง</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/วินาที</translation>
<translation id="6040143037577758943">ปิด</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/วินาที</translation>
-<translation id="477782898153505579">คุณไม่มีการแจ้งเตือนใดๆ สบายใจได้!</translation>
<translation id="7457942297256758195">ล้างทั้งหมด</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> การแจ้งเตือน</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_tr.xtb b/ui/base/strings/ui_strings_tr.xtb
index 7dd86d2f4f..b88c48e553 100644
--- a/ui/base/strings/ui_strings_tr.xtb
+++ b/ui/base/strings/ui_strings_tr.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sn</translation>
<translation id="3990502903496589789">Sağ Kenar</translation>
-<translation id="5182671122927417841">Uzantıyı devre dışı bırak</translation>
<translation id="932327136139879170">Ana Sayfa</translation>
<translation id="3909791450649380159">&amp;Kes</translation>
<translation id="688711909580084195">Başlıksız Web Sayfası</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Page Down</translation>
<translation id="5329858601952122676">&amp;Sil</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Uygulamaların ve uzantıların bildirim izinlerini ayarlayın</translation>
<translation id="6659594942844771486">Sekme</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Ayarlar</translation>
<translation id="2497284189126895209">Tüm Dosyalar</translation>
<translation id="7814458197256864873">K&amp;opyala</translation>
<translation id="3889424535448813030">Sağ Ok</translation>
+<translation id="7135556860107312402">Şunlardan gelen bildirimlere izin ver:</translation>
<translation id="1398853756734560583">Büyüt</translation>
+<translation id="4250229828105606438">Ekran görüntüsü</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Tümünü &amp;seç</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Burada görülecek bir şey yok, devam edin.</translation>
<translation id="2482878487686419369">Bildirimler</translation>
<translation id="3183922693828471536">Buraya Kaydır</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Sağa Kaydır</translation>
<translation id="2666092431469916601">Üst</translation>
<translation id="8331626408530291785">Yukarı Kaydır</translation>
+<translation id="4773379706300191099"><ph name="EXTENSION_NAME"/> bildirimlerini devre dışı bırak</translation>
<translation id="7907591526440419938">Dosya Aç</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Aşağı Kaydır</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sn</translation>
<translation id="6040143037577758943">Kapat</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sn</translation>
-<translation id="477782898153505579">Bildiriminiz yok. Rahat olun!</translation>
<translation id="7457942297256758195">Tümünü Temizle</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Bildirimler</translation>
<translation id="8400147561352026160">ÜstKrkt+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_uk.xtb b/ui/base/strings/ui_strings_uk.xtb
index 7278411df9..53732a20db 100644
--- a/ui/base/strings/ui_strings_uk.xtb
+++ b/ui/base/strings/ui_strings_uk.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> б</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> Мб/сек.</translation>
<translation id="3990502903496589789">Правий край</translation>
-<translation id="5182671122927417841">Вимкнути розширення</translation>
<translation id="932327136139879170">Home</translation>
<translation id="3909791450649380159">Вирізат&amp;и</translation>
<translation id="688711909580084195">Веб-сторінка без назви</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Сторінка вниз</translation>
<translation id="5329858601952122676">&amp;Видалити</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> Кб</translation>
-<translation id="6489863328574614542">Налаштування дозволів сповіщень для програм і розширень</translation>
<translation id="6659594942844771486">Вкладка</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> Мб</translation>
<translation id="8428213095426709021">Налаштування</translation>
<translation id="2497284189126895209">Усі файли</translation>
<translation id="7814458197256864873">&amp;Копіювати</translation>
<translation id="3889424535448813030">Курсор праворуч</translation>
+<translation id="7135556860107312402">Дозволити сповіщення з перелічених нижче джерел.</translation>
<translation id="1398853756734560583">Збільшити</translation>
+<translation id="4250229828105606438">Знімок екрана</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> Гб</translation>
<translation id="1901303067676059328">Вибрати &amp;всі</translation>
<translation id="2168039046890040389">Сторінка вгору</translation>
+<translation id="4927753642311223124">Сповіщень немає.</translation>
<translation id="2482878487686419369">Сповіщення</translation>
<translation id="3183922693828471536">Прокрутка до цього місця</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Прокрутка вправо</translation>
<translation id="2666092431469916601">Верх</translation>
<translation id="8331626408530291785">Прокрутка вгору</translation>
+<translation id="4773379706300191099">Вимкнути сповіщення з розширення <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Відкрити файл</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">Прокрутка вниз</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> Тб/сек.</translation>
<translation id="6040143037577758943">Закрити</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> б/сек.</translation>
-<translation id="477782898153505579">У вас немає сповіщень. Зробіть перепочинок!</translation>
<translation id="7457942297256758195">Очистити все</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> – Сповіщення</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_vi.xtb b/ui/base/strings/ui_strings_vi.xtb
index 008d390ab1..d5ba7873d1 100644
--- a/ui/base/strings/ui_strings_vi.xtb
+++ b/ui/base/strings/ui_strings_vi.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/giây</translation>
<translation id="3990502903496589789">Cạnh bên Phải</translation>
-<translation id="5182671122927417841">Tắt tiện ích mở rộng</translation>
<translation id="932327136139879170">Trang chủ</translation>
<translation id="3909791450649380159">Cắ&amp;t</translation>
<translation id="688711909580084195">Trang web không có tiêu đề</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">Trang Dưới</translation>
<translation id="5329858601952122676">&amp;Xoá</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">Đặt các quyền thông báo cho ứng dụng và tiện ích mở rộng</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">Cài đặt</translation>
<translation id="2497284189126895209">Tất cả Tệp tin</translation>
<translation id="7814458197256864873">Sao &amp;chép</translation>
<translation id="3889424535448813030">Phím mũi tên Phải</translation>
+<translation id="7135556860107312402">Cho phép thông báo từ:</translation>
<translation id="1398853756734560583">Phóng to</translation>
+<translation id="4250229828105606438">Ảnh chụp màn hình</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">Chọn &amp;tất cả</translation>
<translation id="2168039046890040389">Page Up</translation>
+<translation id="4927753642311223124">Không có nội dung nào để xem ở đây, hãy tiếp tục.</translation>
<translation id="2482878487686419369">Thông báo</translation>
<translation id="3183922693828471536">Cuộn tới Đây</translation>
<translation id="4552416320897244156">Trang Dưới</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">Cuộn qua Phải</translation>
<translation id="2666092431469916601">Hàng đầu</translation>
<translation id="8331626408530291785">Cuộn Lên</translation>
+<translation id="4773379706300191099">Tắt thông báo từ <ph name="EXTENSION_NAME"/></translation>
<translation id="7907591526440419938">Mở Tệp</translation>
<translation id="1293699935367580298">Thoát</translation>
<translation id="815598010540052116">Cuộn Xuống</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/giây</translation>
<translation id="6040143037577758943">Đóng</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/giây</translation>
-<translation id="477782898153505579">Bạn không có thông báo nào. Hãy thư giãn!</translation>
<translation id="7457942297256758195">Xóa tất cả</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - Thông báo</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_zh-CN.xtb b/ui/base/strings/ui_strings_zh-CN.xtb
index f2c5aeb100..64298613b0 100644
--- a/ui/base/strings/ui_strings_zh-CN.xtb
+++ b/ui/base/strings/ui_strings_zh-CN.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation>
<translation id="3990502903496589789">右边缘</translation>
-<translation id="5182671122927417841">停用扩展程序</translation>
<translation id="932327136139879170">主页</translation>
<translation id="3909791450649380159">剪切(&amp;T)</translation>
<translation id="688711909580084195">无标题网页</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">向下翻页</translation>
<translation id="5329858601952122676">删除(&amp;D)</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">设置应用和扩展程序的通知权限</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">设置</translation>
<translation id="2497284189126895209">所有文件</translation>
<translation id="7814458197256864873">复制(&amp;C)</translation>
<translation id="3889424535448813030">向右箭头</translation>
+<translation id="7135556860107312402">允许以下来源的通知:</translation>
<translation id="1398853756734560583">最大化</translation>
+<translation id="4250229828105606438">屏幕截图</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">全选(&amp;A)</translation>
<translation id="2168039046890040389">向上翻页</translation>
+<translation id="4927753642311223124">这里没有任何通知,往前走吧。</translation>
<translation id="2482878487686419369">通知</translation>
<translation id="3183922693828471536">滚动到此处</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">向右滚动</translation>
<translation id="2666092431469916601">顶部</translation>
<translation id="8331626408530291785">向上滚动</translation>
+<translation id="4773379706300191099">停用来自“<ph name="EXTENSION_NAME"/>”的通知</translation>
<translation id="7907591526440419938">打开文件</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">向下滚动</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation>
<translation id="6040143037577758943">关闭</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation>
-<translation id="477782898153505579">您未收到任何通知。无需担心!</translation>
<translation id="7457942297256758195">全部清除</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - 通知</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/strings/ui_strings_zh-TW.xtb b/ui/base/strings/ui_strings_zh-TW.xtb
index 0eb0be6693..d3568b615b 100644
--- a/ui/base/strings/ui_strings_zh-TW.xtb
+++ b/ui/base/strings/ui_strings_zh-TW.xtb
@@ -16,7 +16,6 @@
<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation>
<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/秒</translation>
<translation id="3990502903496589789">右邊緣</translation>
-<translation id="5182671122927417841">停用擴充功能</translation>
<translation id="932327136139879170">首頁</translation>
<translation id="3909791450649380159">剪下(&amp;T)</translation>
<translation id="688711909580084195">無標題網頁</translation>
@@ -31,17 +30,19 @@
<translation id="8210608804940886430">向下翻頁</translation>
<translation id="5329858601952122676">刪除(&amp;D)</translation>
<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation>
-<translation id="6489863328574614542">設定應用程式和擴充功能的通知權限</translation>
<translation id="6659594942844771486">Tab</translation>
<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation>
<translation id="8428213095426709021">設定</translation>
<translation id="2497284189126895209">所有檔案</translation>
<translation id="7814458197256864873">複製(&amp;C)</translation>
<translation id="3889424535448813030">向右鍵</translation>
+<translation id="7135556860107312402">允許接收下列來源發出的通知:</translation>
<translation id="1398853756734560583">放到最大</translation>
+<translation id="4250229828105606438">螢幕擷取畫面</translation>
<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation>
<translation id="1901303067676059328">選取全部(&amp;A)</translation>
<translation id="2168039046890040389">向上翻頁</translation>
+<translation id="4927753642311223124">這裡沒有任何通知訊息,以後再來看看吧!</translation>
<translation id="2482878487686419369">通知</translation>
<translation id="3183922693828471536">捲動至此</translation>
<translation id="4552416320897244156">PgDwn</translation>
@@ -52,6 +53,7 @@
<translation id="4588090240171750605">向右捲動</translation>
<translation id="2666092431469916601">置頂</translation>
<translation id="8331626408530291785">向上捲動</translation>
+<translation id="4773379706300191099">停用 <ph name="EXTENSION_NAME"/> 的通知</translation>
<translation id="7907591526440419938">開啟檔案</translation>
<translation id="1293699935367580298">Esc</translation>
<translation id="815598010540052116">向下捲動</translation>
@@ -68,7 +70,6 @@
<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/秒</translation>
<translation id="6040143037577758943">關閉</translation>
<translation id="6142413573757616983"><ph name="QUANTITY"/> B/秒</translation>
-<translation id="477782898153505579">您沒有任何通知,放輕鬆!</translation>
<translation id="7457942297256758195">全部清除</translation>
<translation id="7509316384504965641"><ph name="PRODUCT"/> - 通知</translation>
<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation>
diff --git a/ui/base/test/ui_controls.h b/ui/base/test/ui_controls.h
new file mode 100644
index 0000000000..827c61bddd
--- /dev/null
+++ b/ui/base/test/ui_controls.h
@@ -0,0 +1,102 @@
+// Copyright 2013 The Chromium Authors. 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_BASE_TEST_UI_CONTROLS_H_
+#define UI_BASE_TEST_UI_CONTROLS_H_
+
+#include "base/callback_forward.h"
+#include "build/build_config.h"
+#include "ui/base/keycodes/keyboard_codes.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui_controls {
+
+// A set of utility functions to generate native events in platform
+// independent way. Note that since the implementations depend on a window being
+// top level, these can only be called from test suites that are not sharded.
+// For aura tests, please look into |aura::test:EventGenerator| first. This
+// class provides a way to emulate events in synchronous way and it is often
+// easier to write tests with this class than using |ui_controls|.
+//
+// Many of the functions in this class include a variant that takes a Closure.
+// The version that takes a Closure waits until the generated event is
+// processed. Once the generated event is processed the Closure is Run (and
+// deleted). Note that this is a somewhat fragile process in that any event of
+// the correct type (key down, mouse click, etc.) will trigger the Closure to be
+// run. Hence a usage such as
+//
+// SendKeyPress(...);
+// SendKeyPressNotifyWhenDone(..., task);
+//
+// might trigger |task| early.
+//
+// Note: Windows does not currently do anything with the |window| argument for
+// these functions, so passing NULL is ok.
+
+// Send a key press with/without modifier keys.
+//
+// If you're writing a test chances are you want the variant in ui_test_utils.
+// See it for details.
+
+// Per the above comment, these methods can only be called from non-sharded test
+// suites. This method ensures that they're not accidently called by sharded
+// tests.
+void EnableUIControls();
+
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command);
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task);
+
+// Simulate a mouse move. (x,y) are absolute screen coordinates.
+bool SendMouseMove(long x, long y);
+bool SendMouseMoveNotifyWhenDone(long x,
+ long y,
+ const base::Closure& task);
+
+enum MouseButton {
+ LEFT = 0,
+ MIDDLE,
+ RIGHT,
+};
+
+// Used to indicate the state of the button when generating events.
+enum MouseButtonState {
+ UP = 1,
+ DOWN = 2
+};
+
+// Sends a mouse down and/or up message. The click will be sent to wherever
+// the cursor currently is, so be sure to move the cursor before calling this
+// (and be sure the cursor has arrived!).
+bool SendMouseEvents(MouseButton type, int state);
+bool SendMouseEventsNotifyWhenDone(MouseButton type,
+ int state,
+ const base::Closure& task);
+
+// Same as SendMouseEvents with UP | DOWN.
+bool SendMouseClick(MouseButton type);
+
+#if defined(TOOLKIT_VIEWS)
+// Runs |closure| after processing all pending ui events.
+void RunClosureAfterAllPendingUIEvents(const base::Closure& closure);
+#endif
+
+#if defined(USE_AURA)
+class UIControlsAura;
+void InstallUIControlsAura(UIControlsAura* instance);
+#endif
+
+} // namespace ui_controls
+
+#endif // UI_BASE_TEST_UI_CONTROLS_H_
diff --git a/ui/base/test/ui_controls_aura.cc b/ui/base/test/ui_controls_aura.cc
new file mode 100644
index 0000000000..c8367ab803
--- /dev/null
+++ b/ui/base/test/ui_controls_aura.cc
@@ -0,0 +1,95 @@
+// Copyright 2013 The Chromium Authors. 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/base/test/ui_controls_aura.h"
+
+#include "base/logging.h"
+
+namespace ui_controls {
+namespace {
+UIControlsAura* instance_ = NULL;
+bool g_ui_controls_enabled = false;
+} // namespace
+
+void EnableUIControls() {
+ g_ui_controls_enabled = true;
+}
+
+// An interface to provide Aura implementation of UI control.
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendKeyPress(
+ window, key, control, shift, alt, command);
+}
+
+// static
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendKeyPressNotifyWhenDone(
+ window, key, control, shift, alt, command, task);
+}
+
+// static
+bool SendMouseMove(long x, long y) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendMouseMove(x, y);
+}
+
+// static
+bool SendMouseMoveNotifyWhenDone(long x,
+ long y,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendMouseMoveNotifyWhenDone(x, y, task);
+}
+
+// static
+bool SendMouseEvents(MouseButton type, int state) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendMouseEvents(type, state);
+}
+
+// static
+bool SendMouseEventsNotifyWhenDone(MouseButton type,
+ int state,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendMouseEventsNotifyWhenDone(type, state, task);
+}
+
+// static
+bool SendMouseClick(MouseButton type) {
+ CHECK(g_ui_controls_enabled);
+ return instance_->SendMouseClick(type);
+}
+
+// static
+void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
+ instance_->RunClosureAfterAllPendingUIEvents(closure);
+}
+
+UIControlsAura::UIControlsAura() {
+}
+
+UIControlsAura::~UIControlsAura() {
+}
+
+// static. declared in ui_controls.h
+void InstallUIControlsAura(UIControlsAura* instance) {
+ delete instance_;
+ instance_ = instance;
+}
+
+} // namespace ui_controls
diff --git a/ui/base/test/ui_controls_aura.h b/ui/base/test/ui_controls_aura.h
new file mode 100644
index 0000000000..d379136e53
--- /dev/null
+++ b/ui/base/test/ui_controls_aura.h
@@ -0,0 +1,57 @@
+// Copyright 2013 The Chromium Authors. 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_TEST_BASE_UI_CONTROLS_AURA_H_
+#define UI_TEST_BASE_UI_CONTROLS_AURA_H_
+
+#include "base/callback_forward.h"
+#include "ui/base/keycodes/keyboard_codes.h"
+#include "ui/base/test/ui_controls.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui_controls {
+
+// An interface to provide Aura implementation of UI control.
+class UIControlsAura {
+ public:
+ UIControlsAura();
+ virtual ~UIControlsAura();
+
+ virtual bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) = 0;
+ virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) = 0;
+
+ // Simulate a mouse move. (x,y) are absolute screen coordinates.
+ virtual bool SendMouseMove(long x, long y) = 0;
+ virtual bool SendMouseMoveNotifyWhenDone(long x,
+ long y,
+ const base::Closure& task) = 0;
+
+ // Sends a mouse down and/or up message. The click will be sent to wherever
+ // the cursor currently is, so be sure to move the cursor before calling this
+ // (and be sure the cursor has arrived!).
+ virtual bool SendMouseEvents(MouseButton type, int state) =0;
+ virtual bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
+ const base::Closure& task) = 0;
+ // Same as SendMouseEvents with BUTTON_UP | BUTTON_DOWN.
+ virtual bool SendMouseClick(MouseButton type) = 0;
+
+ // Runs |closure| after processing all pending ui events.
+ virtual void RunClosureAfterAllPendingUIEvents(
+ const base::Closure& closure) = 0;
+};
+
+} // namespace ui_controls
+
+#endif // UI_TEST_BASE_UI_CONTROLS_AURA_H_
diff --git a/ui/base/test/ui_controls_gtk.cc b/ui/base/test/ui_controls_gtk.cc
new file mode 100644
index 0000000000..a91e28cc48
--- /dev/null
+++ b/ui/base/test/ui_controls_gtk.cc
@@ -0,0 +1,261 @@
+// Copyright 2013 The Chromium Authors. 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/base/test/ui_controls.h"
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "base/bind.h"
+#include "base/logging.h"
+#include "base/message_loop.h"
+#include "ui/base/gtk/event_synthesis_gtk.h"
+#include "ui/base/gtk/gtk_screen_util.h"
+#include "ui/gfx/rect.h"
+
+namespace {
+bool g_ui_controls_enabled = false;
+
+// static
+guint32 XTimeNow() {
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
+}
+
+class EventWaiter : public base::MessageLoopForUI::Observer {
+ public:
+ EventWaiter(const base::Closure& task, GdkEventType type, int count)
+ : task_(task),
+ type_(type),
+ count_(count) {
+ base::MessageLoopForUI::current()->AddObserver(this);
+ }
+
+ virtual ~EventWaiter() {
+ base::MessageLoopForUI::current()->RemoveObserver(this);
+ }
+
+ // MessageLoop::Observer implementation:
+ virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {
+ if ((event->type == type_) && (--count_ == 0)) {
+ // At the time we're invoked the event has not actually been processed.
+ // Use PostTask to make sure the event has been processed before
+ // notifying.
+ // NOTE: if processing a message results in running a nested message
+ // loop, then DidProcessEvent isn't immediately sent. As such, we do
+ // the processing in WillProcessEvent rather than DidProcessEvent.
+ base::MessageLoop::current()->PostTask(FROM_HERE, task_);
+ delete this;
+ }
+ }
+
+ virtual void DidProcessEvent(GdkEvent* event) OVERRIDE {
+ // No-op.
+ }
+
+ private:
+ base::Closure task_;
+ GdkEventType type_;
+ // The number of events of this type to wait for.
+ int count_;
+};
+
+void FakeAMouseMotionEvent(gint x, gint y) {
+ GdkEvent* event = gdk_event_new(GDK_MOTION_NOTIFY);
+
+ event->motion.send_event = false;
+ event->motion.time = XTimeNow();
+
+ GtkWidget* grab_widget = gtk_grab_get_current();
+ if (grab_widget) {
+ // If there is a grab, we need to target all events at it regardless of
+ // what widget the mouse is over.
+ event->motion.window = gtk_widget_get_window(grab_widget);
+ } else {
+ event->motion.window = gdk_window_at_pointer(&x, &y);
+ }
+ g_object_ref(event->motion.window);
+ gint window_x, window_y;
+ gdk_window_get_origin(event->motion.window, &window_x, &window_y);
+ event->motion.x = x - window_x;
+ event->motion.y = y - window_y;
+ event->motion.x_root = x;
+ event->motion.y_root = y;
+
+ event->motion.device = gdk_device_get_core_pointer();
+ event->type = GDK_MOTION_NOTIFY;
+
+ gdk_event_put(event);
+ gdk_event_free(event);
+}
+
+} // namespace
+
+namespace ui_controls {
+
+void EnableUIControls() {
+ g_ui_controls_enabled = true;
+}
+
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ CHECK(g_ui_controls_enabled);
+ DCHECK(!command); // No command key on Linux
+ GdkWindow* event_window = NULL;
+ GtkWidget* grab_widget = gtk_grab_get_current();
+ if (grab_widget) {
+ // If there is a grab, send all events to the grabbed widget.
+ event_window = gtk_widget_get_window(grab_widget);
+ } else if (window) {
+ event_window = gtk_widget_get_window(GTK_WIDGET(window));
+ } else {
+ // No target was specified. Send the events to the active toplevel.
+ GList* windows = gtk_window_list_toplevels();
+ for (GList* element = windows; element; element = g_list_next(element)) {
+ GtkWindow* this_window = GTK_WINDOW(element->data);
+ if (gtk_window_is_active(this_window)) {
+ event_window = gtk_widget_get_window(GTK_WIDGET(this_window));
+ break;
+ }
+ }
+ g_list_free(windows);
+ }
+ if (!event_window) {
+ NOTREACHED() << "Window not specified and none is active";
+ return false;
+ }
+
+ std::vector<GdkEvent*> events;
+ ui::SynthesizeKeyPressEvents(event_window, key, control, shift, alt, &events);
+ for (std::vector<GdkEvent*>::iterator iter = events.begin();
+ iter != events.end(); ++iter) {
+ gdk_event_put(*iter);
+ // gdk_event_put appends a copy of the event.
+ gdk_event_free(*iter);
+ }
+
+ return true;
+}
+
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ DCHECK(!command); // No command key on Linux
+ int release_count = 1;
+ if (control)
+ release_count++;
+ if (shift)
+ release_count++;
+ if (alt)
+ release_count++;
+ // This object will delete itself after running |task|.
+ new EventWaiter(task, GDK_KEY_RELEASE, release_count);
+ return SendKeyPress(window, key, control, shift, alt, command);
+}
+
+bool SendMouseMove(long x, long y) {
+ CHECK(g_ui_controls_enabled);
+ gdk_display_warp_pointer(gdk_display_get_default(), gdk_screen_get_default(),
+ x, y);
+ // Sometimes gdk_display_warp_pointer fails to send back any indication of
+ // the move, even though it succesfully moves the server cursor. We fake it in
+ // order to get drags to work.
+ FakeAMouseMotionEvent(x, y);
+ return true;
+}
+
+bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ bool rv = SendMouseMove(x, y);
+ new EventWaiter(task, GDK_MOTION_NOTIFY, 1);
+ return rv;
+}
+
+bool SendMouseEvents(MouseButton type, int state) {
+ CHECK(g_ui_controls_enabled);
+ GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
+
+ event->button.send_event = false;
+ event->button.time = XTimeNow();
+
+ gint x, y;
+ GtkWidget* grab_widget = gtk_grab_get_current();
+ if (grab_widget) {
+ // If there is a grab, we need to target all events at it regardless of
+ // what widget the mouse is over.
+ event->button.window = gtk_widget_get_window(grab_widget);
+ gdk_window_get_pointer(event->button.window, &x, &y, NULL);
+ } else {
+ event->button.window = gdk_window_at_pointer(&x, &y);
+ CHECK(event->button.window);
+ }
+
+ g_object_ref(event->button.window);
+ event->button.x = x;
+ event->button.y = y;
+ gint origin_x, origin_y;
+ gdk_window_get_origin(event->button.window, &origin_x, &origin_y);
+ event->button.x_root = x + origin_x;
+ event->button.y_root = y + origin_y;
+
+ event->button.axes = NULL;
+ GdkModifierType modifier;
+ gdk_window_get_pointer(event->button.window, NULL, NULL, &modifier);
+ event->button.state = modifier;
+ event->button.button = type == LEFT ? 1 : (type == MIDDLE ? 2 : 3);
+ event->button.device = gdk_device_get_core_pointer();
+
+ event->button.type = GDK_BUTTON_PRESS;
+ if (state & DOWN)
+ gdk_event_put(event);
+
+ // Also send a release event.
+ GdkEvent* release_event = gdk_event_copy(event);
+ release_event->button.type = GDK_BUTTON_RELEASE;
+ release_event->button.time++;
+ if (state & UP)
+ gdk_event_put(release_event);
+
+ gdk_event_free(event);
+ gdk_event_free(release_event);
+
+ return false;
+}
+
+bool SendMouseEventsNotifyWhenDone(MouseButton type,
+ int state,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ bool rv = SendMouseEvents(type, state);
+ GdkEventType wait_type;
+ if (state & UP) {
+ wait_type = GDK_BUTTON_RELEASE;
+ } else {
+ if (type == LEFT)
+ wait_type = GDK_BUTTON_PRESS;
+ else if (type == MIDDLE)
+ wait_type = GDK_2BUTTON_PRESS;
+ else
+ wait_type = GDK_3BUTTON_PRESS;
+ }
+ new EventWaiter(task, wait_type, 1);
+ return rv;
+}
+
+bool SendMouseClick(MouseButton type) {
+ CHECK(g_ui_controls_enabled);
+ return SendMouseEvents(type, UP | DOWN);
+}
+
+} // namespace ui_controls
diff --git a/ui/base/test/ui_controls_internal_win.cc b/ui/base/test/ui_controls_internal_win.cc
new file mode 100644
index 0000000000..990145c125
--- /dev/null
+++ b/ui/base/test/ui_controls_internal_win.cc
@@ -0,0 +1,347 @@
+// Copyright 2013 The Chromium Authors. 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/base/test/ui_controls_internal_win.h"
+
+#include "base/bind.h"
+#include "base/callback.h"
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "base/message_loop.h"
+#include "ui/base/keycodes/keyboard_code_conversion_win.h"
+#include "ui/base/keycodes/keyboard_codes.h"
+
+#if defined(USE_AURA)
+#include "ui/aura/root_window.h"
+#include "ui/aura/window.h"
+#endif
+
+namespace {
+
+// InputDispatcher ------------------------------------------------------------
+
+// InputDispatcher is used to listen for a mouse/keyboard event. When the
+// appropriate event is received the task is notified.
+class InputDispatcher : public base::RefCounted<InputDispatcher> {
+ public:
+ InputDispatcher(const base::Closure& task, WPARAM message_waiting_for);
+
+ // Invoked from the hook. If mouse_message matches message_waiting_for_
+ // MatchingMessageFound is invoked.
+ void DispatchedMessage(WPARAM mouse_message);
+
+ // Invoked when a matching event is found. Uninstalls the hook and schedules
+ // an event that notifies the task.
+ void MatchingMessageFound();
+
+ private:
+ friend class base::RefCounted<InputDispatcher>;
+
+ ~InputDispatcher();
+
+ // Notifies the task and release this (which should delete it).
+ void NotifyTask();
+
+ // The task we notify.
+ base::Closure task_;
+
+ // Message we're waiting for. Not used for keyboard events.
+ const WPARAM message_waiting_for_;
+
+ DISALLOW_COPY_AND_ASSIGN(InputDispatcher);
+};
+
+// Have we installed the hook?
+bool installed_hook_ = false;
+
+// Return value from SetWindowsHookEx.
+HHOOK next_hook_ = NULL;
+
+// If a hook is installed, this is the dispatcher.
+InputDispatcher* current_dispatcher_ = NULL;
+
+// Callback from hook when a mouse message is received.
+LRESULT CALLBACK MouseHook(int n_code, WPARAM w_param, LPARAM l_param) {
+ HHOOK next_hook = next_hook_;
+ if (n_code == HC_ACTION) {
+ DCHECK(current_dispatcher_);
+ current_dispatcher_->DispatchedMessage(w_param);
+ }
+ return CallNextHookEx(next_hook, n_code, w_param, l_param);
+}
+
+// Callback from hook when a key message is received.
+LRESULT CALLBACK KeyHook(int n_code, WPARAM w_param, LPARAM l_param) {
+ HHOOK next_hook = next_hook_;
+ if (n_code == HC_ACTION) {
+ DCHECK(current_dispatcher_);
+ if (l_param & (1 << 30)) {
+ // Only send on key up.
+ current_dispatcher_->MatchingMessageFound();
+ }
+ }
+ return CallNextHookEx(next_hook, n_code, w_param, l_param);
+}
+
+// Installs dispatcher as the current hook.
+void InstallHook(InputDispatcher* dispatcher, bool key_hook) {
+ DCHECK(!installed_hook_);
+ current_dispatcher_ = dispatcher;
+ installed_hook_ = true;
+ if (key_hook) {
+ next_hook_ = SetWindowsHookEx(WH_KEYBOARD, &KeyHook, NULL,
+ GetCurrentThreadId());
+ } else {
+ // NOTE: I originally tried WH_CALLWNDPROCRET, but for some reason I
+ // didn't get a mouse message like I do with MouseHook.
+ next_hook_ = SetWindowsHookEx(WH_MOUSE, &MouseHook, NULL,
+ GetCurrentThreadId());
+ }
+ DCHECK(next_hook_);
+}
+
+// Uninstalls the hook set in InstallHook.
+void UninstallHook(InputDispatcher* dispatcher) {
+ if (current_dispatcher_ == dispatcher) {
+ installed_hook_ = false;
+ current_dispatcher_ = NULL;
+ UnhookWindowsHookEx(next_hook_);
+ }
+}
+
+InputDispatcher::InputDispatcher(const base::Closure& task,
+ WPARAM message_waiting_for)
+ : task_(task), message_waiting_for_(message_waiting_for) {
+ InstallHook(this, message_waiting_for == WM_KEYUP);
+}
+
+InputDispatcher::~InputDispatcher() {
+ // Make sure the hook isn't installed.
+ UninstallHook(this);
+}
+
+void InputDispatcher::DispatchedMessage(WPARAM message) {
+ if (message == message_waiting_for_)
+ MatchingMessageFound();
+}
+
+void InputDispatcher::MatchingMessageFound() {
+ UninstallHook(this);
+ // At the time we're invoked the event has not actually been processed.
+ // Use PostTask to make sure the event has been processed before notifying.
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&InputDispatcher::NotifyTask, this));
+}
+
+void InputDispatcher::NotifyTask() {
+ task_.Run();
+ Release();
+}
+
+// Private functions ----------------------------------------------------------
+
+// Populate the INPUT structure with the appropriate keyboard event
+// parameters required by SendInput
+bool FillKeyboardInput(ui::KeyboardCode key, INPUT* input, bool key_up) {
+ memset(input, 0, sizeof(INPUT));
+ input->type = INPUT_KEYBOARD;
+ input->ki.wVk = ui::WindowsKeyCodeForKeyboardCode(key);
+ input->ki.dwFlags = key_up ? KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP :
+ KEYEVENTF_EXTENDEDKEY;
+
+ return true;
+}
+
+// Send a key event (up/down)
+bool SendKeyEvent(ui::KeyboardCode key, bool up) {
+ INPUT input = { 0 };
+
+ if (!FillKeyboardInput(key, &input, up))
+ return false;
+
+ if (!::SendInput(1, &input, sizeof(INPUT)))
+ return false;
+
+ return true;
+}
+
+} // namespace
+
+namespace ui_controls {
+namespace internal {
+
+bool SendKeyPressImpl(HWND window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ const base::Closure& task) {
+ // SendInput only works as we expect it if one of our windows is the
+ // foreground window already.
+ HWND target_window = (::GetActiveWindow() &&
+ ::GetWindow(::GetActiveWindow(), GW_OWNER) == window) ?
+ ::GetActiveWindow() :
+ window;
+ if (window && ::GetForegroundWindow() != target_window)
+ return false;
+
+ scoped_refptr<InputDispatcher> dispatcher(
+ !task.is_null() ? new InputDispatcher(task, WM_KEYUP) : NULL);
+
+ // If a pop-up menu is open, it won't receive events sent using SendInput.
+ // Check for a pop-up menu using its window class (#32768) and if one
+ // exists, send the key event directly there.
+ HWND popup_menu = ::FindWindow(L"#32768", 0);
+ if (popup_menu != NULL && popup_menu == ::GetTopWindow(NULL)) {
+ WPARAM w_param = ui::WindowsKeyCodeForKeyboardCode(key);
+ LPARAM l_param = 0;
+ ::SendMessage(popup_menu, WM_KEYDOWN, w_param, l_param);
+ ::SendMessage(popup_menu, WM_KEYUP, w_param, l_param);
+
+ if (dispatcher.get())
+ dispatcher->AddRef();
+ return true;
+ }
+
+ INPUT input[8] = { 0 }; // 8, assuming all the modifiers are activated.
+
+ UINT i = 0;
+ if (control) {
+ if (!FillKeyboardInput(ui::VKEY_CONTROL, &input[i], false))
+ return false;
+ i++;
+ }
+
+ if (shift) {
+ if (!FillKeyboardInput(ui::VKEY_SHIFT, &input[i], false))
+ return false;
+ i++;
+ }
+
+ if (alt) {
+ if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], false))
+ return false;
+ i++;
+ }
+
+ if (!FillKeyboardInput(key, &input[i], false))
+ return false;
+ i++;
+
+ if (!FillKeyboardInput(key, &input[i], true))
+ return false;
+ i++;
+
+ if (alt) {
+ if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], true))
+ return false;
+ i++;
+ }
+
+ if (shift) {
+ if (!FillKeyboardInput(ui::VKEY_SHIFT, &input[i], true))
+ return false;
+ i++;
+ }
+
+ if (control) {
+ if (!FillKeyboardInput(ui::VKEY_CONTROL, &input[i], true))
+ return false;
+ i++;
+ }
+
+ if (::SendInput(i, input, sizeof(INPUT)) != i)
+ return false;
+
+ if (dispatcher.get())
+ dispatcher->AddRef();
+
+ return true;
+}
+
+bool SendMouseMoveImpl(long x, long y, const base::Closure& task) {
+ // First check if the mouse is already there.
+ POINT current_pos;
+ ::GetCursorPos(&current_pos);
+ if (x == current_pos.x && y == current_pos.y) {
+ if (!task.is_null())
+ base::MessageLoop::current()->PostTask(FROM_HERE, task);
+ return true;
+ }
+
+ INPUT input = { 0 };
+
+ int screen_width = ::GetSystemMetrics(SM_CXSCREEN) - 1;
+ int screen_height = ::GetSystemMetrics(SM_CYSCREEN) - 1;
+ LONG pixel_x = static_cast<LONG>(x * (65535.0f / screen_width));
+ LONG pixel_y = static_cast<LONG>(y * (65535.0f / screen_height));
+
+ input.type = INPUT_MOUSE;
+ input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
+ input.mi.dx = pixel_x;
+ input.mi.dy = pixel_y;
+
+ scoped_refptr<InputDispatcher> dispatcher(
+ !task.is_null() ? new InputDispatcher(task, WM_MOUSEMOVE) : NULL);
+
+ if (!::SendInput(1, &input, sizeof(INPUT)))
+ return false;
+
+ if (dispatcher.get())
+ dispatcher->AddRef();
+
+ return true;
+}
+
+bool SendMouseEventsImpl(MouseButton type, int state,
+ const base::Closure& task) {
+ DWORD down_flags = MOUSEEVENTF_ABSOLUTE;
+ DWORD up_flags = MOUSEEVENTF_ABSOLUTE;
+ UINT last_event;
+
+ switch (type) {
+ case LEFT:
+ down_flags |= MOUSEEVENTF_LEFTDOWN;
+ up_flags |= MOUSEEVENTF_LEFTUP;
+ last_event = (state & UP) ? WM_LBUTTONUP : WM_LBUTTONDOWN;
+ break;
+
+ case MIDDLE:
+ down_flags |= MOUSEEVENTF_MIDDLEDOWN;
+ up_flags |= MOUSEEVENTF_MIDDLEUP;
+ last_event = (state & UP) ? WM_MBUTTONUP : WM_MBUTTONDOWN;
+ break;
+
+ case RIGHT:
+ down_flags |= MOUSEEVENTF_RIGHTDOWN;
+ up_flags |= MOUSEEVENTF_RIGHTUP;
+ last_event = (state & UP) ? WM_RBUTTONUP : WM_RBUTTONDOWN;
+ break;
+
+ default:
+ NOTREACHED();
+ return false;
+ }
+
+ scoped_refptr<InputDispatcher> dispatcher(
+ !task.is_null() ? new InputDispatcher(task, last_event) : NULL);
+
+ INPUT input = { 0 };
+ input.type = INPUT_MOUSE;
+ input.mi.dwFlags = down_flags;
+ if ((state & DOWN) && !::SendInput(1, &input, sizeof(INPUT)))
+ return false;
+
+ input.mi.dwFlags = up_flags;
+ if ((state & UP) && !::SendInput(1, &input, sizeof(INPUT)))
+ return false;
+
+ if (dispatcher.get())
+ dispatcher->AddRef();
+
+ return true;
+}
+
+} // namespace internal
+} // namespace ui_controls
diff --git a/ui/base/test/ui_controls_internal_win.h b/ui/base/test/ui_controls_internal_win.h
new file mode 100644
index 0000000000..4b87ce329e
--- /dev/null
+++ b/ui/base/test/ui_controls_internal_win.h
@@ -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.
+
+#ifndef UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_
+#define UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_
+
+#include "base/callback_forward.h"
+#include "ui/base/test/ui_controls.h"
+
+namespace ui_controls {
+namespace internal {
+
+// A utility functions for windows to send key or mouse events and
+// run the task. These functions are internal, but exported so that
+// aura implementation can use these utility functions.
+bool SendKeyPressImpl(HWND hwnd,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ const base::Closure& task);
+bool SendMouseMoveImpl(long x, long y, const base::Closure& task);
+bool SendMouseEventsImpl(MouseButton type,
+ int state,
+ const base::Closure& task);
+void RunClosureAfterAllPendingUITasksImpl(const base::Closure& task);
+
+} // namespace internal
+} // namespace ui_controls
+
+#endif // UI_BASE_TEST_UI_CONTROLS_INTERNAL_WIN_H_
diff --git a/ui/base/test/ui_controls_mac.mm b/ui/base/test/ui_controls_mac.mm
new file mode 100644
index 0000000000..23aabe0a66
--- /dev/null
+++ b/ui/base/test/ui_controls_mac.mm
@@ -0,0 +1,373 @@
+// Copyright 2013 The Chromium Authors. 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/base/test/ui_controls.h"
+
+#import <Cocoa/Cocoa.h>
+#include <mach/mach_time.h>
+#include <vector>
+
+#include "base/bind.h"
+#include "base/callback.h"
+#include "base/message_loop.h"
+#include "ui/base/keycodes/keyboard_code_conversion_mac.h"
+
+
+// Implementation details: We use [NSApplication sendEvent:] instead
+// of [NSApplication postEvent:atStart:] so that the event gets sent
+// immediately. This lets us run the post-event task right
+// immediately as well. Unfortunately I cannot subclass NSEvent (it's
+// probably a class cluster) to allow other easy answers. For
+// example, if I could subclass NSEvent, I could run the Task in it's
+// dealloc routine (which necessarily happens after the event is
+// dispatched). Unlike Linux, Mac does not have message loop
+// observer/notification. Unlike windows, I cannot post non-events
+// into the event queue. (I can post other kinds of tasks but can't
+// guarantee their order with regards to events).
+
+// But [NSApplication sendEvent:] causes a problem when sending mouse click
+// events. Because in order to handle mouse drag, when processing a mouse
+// click event, the application may want to retrieve the next event
+// synchronously by calling NSApplication's nextEventMatchingMask method.
+// In this case, [NSApplication sendEvent:] causes deadlock.
+// So we need to use [NSApplication postEvent:atStart:] for mouse click
+// events. In order to notify the caller correctly after all events has been
+// processed, we setup a task to watch for the event queue time to time and
+// notify the caller as soon as there is no event in the queue.
+//
+// TODO(suzhe):
+// 1. Investigate why using [NSApplication postEvent:atStart:] for keyboard
+// events causes BrowserKeyEventsTest.CommandKeyEvents to fail.
+// See http://crbug.com/49270
+// 2. On OSX 10.6, [NSEvent addLocalMonitorForEventsMatchingMask:handler:] may
+// be used, so that we don't need to poll the event queue time to time.
+
+namespace {
+
+// From
+// http://stackoverflow.com/questions/1597383/cgeventtimestamp-to-nsdate
+// Which credits Apple sample code for this routine.
+uint64_t UpTimeInNanoseconds(void) {
+ uint64_t time;
+ uint64_t timeNano;
+ static mach_timebase_info_data_t sTimebaseInfo;
+
+ time = mach_absolute_time();
+
+ // Convert to nanoseconds.
+
+ // If this is the first time we've run, get the timebase.
+ // We can use denom == 0 to indicate that sTimebaseInfo is
+ // uninitialised because it makes no sense to have a zero
+ // denominator is a fraction.
+ if (sTimebaseInfo.denom == 0) {
+ (void) mach_timebase_info(&sTimebaseInfo);
+ }
+
+ // This could overflow; for testing needs we probably don't care.
+ timeNano = time * sTimebaseInfo.numer / sTimebaseInfo.denom;
+ return timeNano;
+}
+
+NSTimeInterval TimeIntervalSinceSystemStartup() {
+ return UpTimeInNanoseconds() / 1000000000.0;
+}
+
+// Creates and returns an autoreleased key event.
+NSEvent* SynthesizeKeyEvent(NSWindow* window,
+ bool keyDown,
+ ui::KeyboardCode keycode,
+ NSUInteger flags) {
+ unichar character;
+ unichar characterIgnoringModifiers;
+ int macKeycode = ui::MacKeyCodeForWindowsKeyCode(
+ keycode, flags, &character, &characterIgnoringModifiers);
+
+ if (macKeycode < 0)
+ return nil;
+
+ NSString* charactersIgnoringModifiers =
+ [[[NSString alloc] initWithCharacters:&characterIgnoringModifiers
+ length:1]
+ autorelease];
+ NSString* characters =
+ [[[NSString alloc] initWithCharacters:&character length:1] autorelease];
+
+ NSEventType type = (keyDown ? NSKeyDown : NSKeyUp);
+
+ // Modifier keys generate NSFlagsChanged event rather than
+ // NSKeyDown/NSKeyUp events.
+ if (keycode == ui::VKEY_CONTROL || keycode == ui::VKEY_SHIFT ||
+ keycode == ui::VKEY_MENU || keycode == ui::VKEY_COMMAND)
+ type = NSFlagsChanged;
+
+ // For events other than mouse moved, [event locationInWindow] is
+ // UNDEFINED if the event is not NSMouseMoved. Thus, the (0,0)
+ // location should be fine.
+ NSEvent* event =
+ [NSEvent keyEventWithType:type
+ location:NSMakePoint(0, 0)
+ modifierFlags:flags
+ timestamp:TimeIntervalSinceSystemStartup()
+ windowNumber:[window windowNumber]
+ context:nil
+ characters:characters
+ charactersIgnoringModifiers:charactersIgnoringModifiers
+ isARepeat:NO
+ keyCode:(unsigned short)macKeycode];
+
+ return event;
+}
+
+// Creates the proper sequence of autoreleased key events for a key down + up.
+void SynthesizeKeyEventsSequence(NSWindow* window,
+ ui::KeyboardCode keycode,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ std::vector<NSEvent*>* events) {
+ NSEvent* event = nil;
+ NSUInteger flags = 0;
+ if (control) {
+ flags |= NSControlKeyMask;
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_CONTROL, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (shift) {
+ flags |= NSShiftKeyMask;
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_SHIFT, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (alt) {
+ flags |= NSAlternateKeyMask;
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_MENU, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (command) {
+ flags |= NSCommandKeyMask;
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_COMMAND, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+
+ event = SynthesizeKeyEvent(window, true, keycode, flags);
+ DCHECK(event);
+ events->push_back(event);
+ event = SynthesizeKeyEvent(window, false, keycode, flags);
+ DCHECK(event);
+ events->push_back(event);
+
+ if (command) {
+ flags &= ~NSCommandKeyMask;
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_COMMAND, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (alt) {
+ flags &= ~NSAlternateKeyMask;
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_MENU, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (shift) {
+ flags &= ~NSShiftKeyMask;
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_SHIFT, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+ if (control) {
+ flags &= ~NSControlKeyMask;
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_CONTROL, flags);
+ DCHECK(event);
+ events->push_back(event);
+ }
+}
+
+// A helper function to watch for the event queue. The specific task will be
+// fired when there is no more event in the queue.
+void EventQueueWatcher(const base::Closure& task) {
+ NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:nil
+ inMode:NSDefaultRunLoopMode
+ dequeue:NO];
+ // If there is still event in the queue, then we need to check again.
+ if (event) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&EventQueueWatcher, task));
+ } else {
+ base::MessageLoop::current()->PostTask(FROM_HERE, task);
+ }
+}
+
+// Stores the current mouse location on the screen. So that we can use it
+// when firing keyboard and mouse click events.
+NSPoint g_mouse_location = { 0, 0 };
+
+bool g_ui_controls_enabled = false;
+
+} // namespace
+
+namespace ui_controls {
+
+void EnableUIControls() {
+ g_ui_controls_enabled = true;
+}
+
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ CHECK(g_ui_controls_enabled);
+ return SendKeyPressNotifyWhenDone(window, key,
+ control, shift, alt, command,
+ base::Closure());
+}
+
+// Win and Linux implement a SendKeyPress() this as a
+// SendKeyPressAndRelease(), so we should as well (despite the name).
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
+
+ std::vector<NSEvent*> events;
+ SynthesizeKeyEventsSequence(
+ window, key, control, shift, alt, command, &events);
+
+ // TODO(suzhe): Using [NSApplication postEvent:atStart:] here causes
+ // BrowserKeyEventsTest.CommandKeyEvents to fail. See http://crbug.com/49270
+ // But using [NSApplication sendEvent:] should be safe for keyboard events,
+ // because until now, no code wants to retrieve the next event when handling
+ // a keyboard event.
+ for (std::vector<NSEvent*>::iterator iter = events.begin();
+ iter != events.end(); ++iter)
+ [[NSApplication sharedApplication] sendEvent:*iter];
+
+ if (!task.is_null()) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&EventQueueWatcher, task));
+ }
+
+ return true;
+}
+
+bool SendMouseMove(long x, long y) {
+ CHECK(g_ui_controls_enabled);
+ return SendMouseMoveNotifyWhenDone(x, y, base::Closure());
+}
+
+// Input position is in screen coordinates. However, NSMouseMoved
+// events require them window-relative, so we adjust. We *DO* flip
+// the coordinate space, so input events can be the same for all
+// platforms. E.g. (0,0) is upper-left.
+bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ NSWindow* window = [[NSApplication sharedApplication] keyWindow];
+ CGFloat screenHeight =
+ [[[NSScreen screens] objectAtIndex:0] frame].size.height;
+ g_mouse_location = NSMakePoint(x, screenHeight - y); // flip!
+ NSPoint pointInWindow = g_mouse_location;
+ if (window)
+ pointInWindow = [window convertScreenToBase:pointInWindow];
+ NSTimeInterval timestamp = TimeIntervalSinceSystemStartup();
+
+ NSEvent* event =
+ [NSEvent mouseEventWithType:NSMouseMoved
+ location:pointInWindow
+ modifierFlags:0
+ timestamp:timestamp
+ windowNumber:[window windowNumber]
+ context:nil
+ eventNumber:0
+ clickCount:0
+ pressure:0.0];
+ [[NSApplication sharedApplication] postEvent:event atStart:NO];
+
+ if (!task.is_null()) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&EventQueueWatcher, task));
+ }
+
+ return true;
+}
+
+bool SendMouseEvents(MouseButton type, int state) {
+ CHECK(g_ui_controls_enabled);
+ return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
+}
+
+bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ // On windows it appears state can be (UP|DOWN). It is unclear if
+ // that'll happen here but prepare for it just in case.
+ if (state == (UP|DOWN)) {
+ return (SendMouseEventsNotifyWhenDone(type, DOWN, base::Closure()) &&
+ SendMouseEventsNotifyWhenDone(type, UP, task));
+ }
+ NSEventType etype = 0;
+ if (type == LEFT) {
+ if (state == UP) {
+ etype = NSLeftMouseUp;
+ } else {
+ etype = NSLeftMouseDown;
+ }
+ } else if (type == MIDDLE) {
+ if (state == UP) {
+ etype = NSOtherMouseUp;
+ } else {
+ etype = NSOtherMouseDown;
+ }
+ } else if (type == RIGHT) {
+ if (state == UP) {
+ etype = NSRightMouseUp;
+ } else {
+ etype = NSRightMouseDown;
+ }
+ } else {
+ return false;
+ }
+ NSWindow* window = [[NSApplication sharedApplication] keyWindow];
+ NSPoint pointInWindow = g_mouse_location;
+ if (window)
+ pointInWindow = [window convertScreenToBase:pointInWindow];
+
+ NSEvent* event =
+ [NSEvent mouseEventWithType:etype
+ location:pointInWindow
+ modifierFlags:0
+ timestamp:TimeIntervalSinceSystemStartup()
+ windowNumber:[window windowNumber]
+ context:nil
+ eventNumber:0
+ clickCount:1
+ pressure:(state == DOWN ? 1.0 : 0.0 )];
+ [[NSApplication sharedApplication] postEvent:event atStart:NO];
+
+ if (!task.is_null()) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&EventQueueWatcher, task));
+ }
+
+ return true;
+}
+
+bool SendMouseClick(MouseButton type) {
+ CHECK(g_ui_controls_enabled);
+ return SendMouseEventsNotifyWhenDone(type, UP|DOWN, base::Closure());
+}
+
+} // namespace ui_controls
diff --git a/ui/base/test/ui_controls_win.cc b/ui/base/test/ui_controls_win.cc
new file mode 100644
index 0000000000..a7bf4d03e2
--- /dev/null
+++ b/ui/base/test/ui_controls_win.cc
@@ -0,0 +1,75 @@
+// Copyright 2013 The Chromium Authors. 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/base/test/ui_controls.h"
+
+#include "base/callback.h"
+#include "base/message_loop.h"
+#include "ui/base/test/ui_controls_internal_win.h"
+#include "ui/gfx/point.h"
+#include "ui/views/view.h"
+
+namespace ui_controls {
+bool g_ui_controls_enabled = false;
+
+void EnableUIControls() {
+ g_ui_controls_enabled = true;
+}
+
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ CHECK(g_ui_controls_enabled);
+ DCHECK(!command); // No command key on Windows
+ return internal::SendKeyPressImpl(window, key, control, shift, alt,
+ base::Closure());
+}
+
+bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ DCHECK(!command); // No command key on Windows
+ return internal::SendKeyPressImpl(window, key, control, shift, alt, task);
+}
+
+bool SendMouseMove(long x, long y) {
+ CHECK(g_ui_controls_enabled);
+ return internal::SendMouseMoveImpl(x, y, base::Closure());
+}
+
+bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ return internal::SendMouseMoveImpl(x, y, task);
+}
+
+bool SendMouseEvents(MouseButton type, int state) {
+ CHECK(g_ui_controls_enabled);
+ return internal::SendMouseEventsImpl(type, state, base::Closure());
+}
+
+bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
+ const base::Closure& task) {
+ CHECK(g_ui_controls_enabled);
+ return internal::SendMouseEventsImpl(type, state, task);
+}
+
+bool SendMouseClick(MouseButton type) {
+ CHECK(g_ui_controls_enabled);
+ return internal::SendMouseEventsImpl(type, UP | DOWN, base::Closure());
+}
+
+void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
+ // On windows, posting UI events is synchronous so just post the closure.
+ base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure);
+}
+
+} // namespace ui_controls
diff --git a/ui/base/text/bytes_formatting.cc b/ui/base/text/bytes_formatting.cc
index 169566e95d..f3f59d9f7f 100644
--- a/ui/base/text/bytes_formatting.cc
+++ b/ui/base/text/bytes_formatting.cc
@@ -7,7 +7,7 @@
#include "base/i18n/number_formatting.h"
#include "base/logging.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ui/base/text/bytes_formatting_unittest.cc b/ui/base/text/bytes_formatting_unittest.cc
index 3a57dd2170..357abc756a 100644
--- a/ui/base/text/bytes_formatting_unittest.cc
+++ b/ui/base/text/bytes_formatting_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/text/bytes_formatting.h"
diff --git a/ui/base/text/text_elider.cc b/ui/base/text/text_elider.cc
index 1ef4026232..c5d779f58b 100644
--- a/ui/base/text/text_elider.cc
+++ b/ui/base/text/text_elider.cc
@@ -20,7 +20,7 @@
#include "base/string_util.h"
#include "base/strings/string_split.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
#include "net/base/net_util.h"
diff --git a/ui/base/text/text_elider_unittest.cc b/ui/base/text/text_elider_unittest.cc
index 7b45fd4c45..92589474d5 100644
--- a/ui/base/text/text_elider_unittest.cc
+++ b/ui/base/text/text_elider_unittest.cc
@@ -10,7 +10,7 @@
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/font.h"
diff --git a/ui/base/touch/touch_device_aurax11.cc b/ui/base/touch/touch_device_aurax11.cc
index 9c611f5185..2e34b3289a 100644
--- a/ui/base/touch/touch_device_aurax11.cc
+++ b/ui/base/touch/touch_device_aurax11.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/aura/window.h"
#include "ui/base/touch/touch_device.h"
#include "ui/base/touch/touch_factory_x11.h"
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc
index f4c3b7cbad..51a9546c78 100644
--- a/ui/base/ui_base_switches.cc
+++ b/ui/base/ui_base_switches.cc
@@ -39,6 +39,9 @@ const char kEnableTouchEditing[] = "enable-touch-editing";
// Enables the Views textfield on Windows.
const char kEnableViewsTextfield[] = "enable-views-textfield";
+// Enables/Disables High DPI support (windows)
+const char kHighDPISupport[] = "high-dpi-support";
+
// Overrides the device scale factor for the browser UI and the contents.
const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index da5fd4b959..dfaed583b1 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -24,6 +24,7 @@ UI_EXPORT extern const char kEnableTouchDragDrop[];
UI_EXPORT extern const char kEnableTouchEditing[];
UI_EXPORT extern const char kEnableViewsTextfield[];
UI_EXPORT extern const char kForceDeviceScaleFactor[];
+UI_EXPORT extern const char kHighDPISupport[];
UI_EXPORT extern const char kHighlightMissingScaledResources[];
UI_EXPORT extern const char kLang[];
UI_EXPORT extern const char kLocalePak[];
diff --git a/ui/base/ui_base_switches_util.cc b/ui/base/ui_base_switches_util.cc
index c541a9b1b2..32034218dd 100644
--- a/ui/base/ui_base_switches_util.cc
+++ b/ui/base/ui_base_switches_util.cc
@@ -10,13 +10,23 @@
namespace switches {
bool IsTouchDragDropEnabled() {
+#if defined(OS_CHROMEOS)
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableTouchDragDrop);
+#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTouchDragDrop);
+#endif
}
bool IsTouchEditingEnabled() {
+#if defined(OS_CHROMEOS)
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableTouchEditing);
+#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTouchEditing);
+#endif
}
bool IsNewDialogStyleEnabled() {
diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc
index 75d63bba3d..9b2db5b755 100644
--- a/ui/base/win/dpi.cc
+++ b/ui/base/win/dpi.cc
@@ -5,10 +5,11 @@
#include "ui/base/win/dpi.h"
#include <windows.h>
-
+#include "base/command_line.h"
#include "base/win/scoped_hdc.h"
#include "ui/base/layout.h"
#include "base/win/registry.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/gfx/display.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/rect_conversions.h"
@@ -19,16 +20,26 @@ namespace {
int kDefaultDPIX = 96;
int kDefaultDPIY = 96;
+bool IsHighDPIEnabled() {
+ // Default is disabled.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kHighDPISupport)) {
+ return CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kHighDPISupport).compare("1") == 0;
+ }
+ return false;
+}
+
float GetDeviceScaleFactorImpl() {
#if defined(ENABLE_HIDPI)
- float scale = gfx::Display::HasForceDeviceScaleFactor() ?
- gfx::Display::GetForcedDeviceScaleFactor() : ui::GetDPIScale();
- // Quantize to nearest supported scale factor.
- scale = ui::GetScaleFactorScale(ui::GetScaleFactorFromScale(scale));
- return scale;
-#else
- return 1.0f;
+ if (IsHighDPIEnabled()) {
+ float scale = gfx::Display::HasForceDeviceScaleFactor() ?
+ gfx::Display::GetForcedDeviceScaleFactor() : ui::GetDPIScale();
+ // Quantize to nearest supported scale factor.
+ scale = ui::GetScaleFactorScale(ui::GetScaleFactorFromScale(scale));
+ return scale;
+ }
#endif
+ return 1.0f;
}
BOOL IsProcessDPIAwareWrapper() {
diff --git a/ui/base/win/ime_input.cc b/ui/base/win/ime_input.cc
index 9c604f7745..cd2623606b 100644
--- a/ui/base/win/ime_input.cc
+++ b/ui/base/win/ime_input.cc
@@ -12,7 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_comptr.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ime/composition_text.h"
diff --git a/ui/base/win/mouse_wheel_util.cc b/ui/base/win/mouse_wheel_util.cc
index 2cf18de02c..941c069e00 100644
--- a/ui/base/win/mouse_wheel_util.cc
+++ b/ui/base/win/mouse_wheel_util.cc
@@ -22,8 +22,7 @@ static bool WindowSupportsRerouteMouseWheel(HWND window) {
if (!IsWindow(window))
break;
- if (reinterpret_cast<bool>(
- ViewProp::GetValue(window, kHWNDSupportMouseWheelRerouting))) {
+ if (ViewProp::GetValue(window, kHWNDSupportMouseWheelRerouting) != NULL) {
return true;
}
window = GetParent(window);
diff --git a/ui/base/win/singleton_hwnd.cc b/ui/base/win/singleton_hwnd.cc
index a4af8abb46..aad849e20a 100644
--- a/ui/base/win/singleton_hwnd.cc
+++ b/ui/base/win/singleton_hwnd.cc
@@ -17,8 +17,8 @@ SingletonHwnd* SingletonHwnd::GetInstance() {
void SingletonHwnd::AddObserver(Observer* observer) {
if (!hwnd()) {
- if (!MessageLoop::current() ||
- MessageLoop::current()->type() != MessageLoop::TYPE_UI) {
+ if (!base::MessageLoop::current() ||
+ base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) {
// Creating this window in (e.g.) a renderer inhibits shutdown on
// Windows. See http://crbug.com/230122 and http://crbug.com/236039.
DLOG(ERROR) << "Cannot create windows on non-UI thread!";
diff --git a/ui/base/x/selection_utils.cc b/ui/base/x/selection_utils.cc
index f9450e8e27..307ce8769a 100644
--- a/ui/base/x/selection_utils.cc
+++ b/ui/base/x/selection_utils.cc
@@ -8,7 +8,7 @@
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/x/x11_atom_cache.h"
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index cf5f2a8582..498dc95f48 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -17,10 +17,8 @@
#include <utility>
#include <vector>
-#include <X11/extensions/randr.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/XInput2.h>
-#include <X11/extensions/Xrandr.h>
#include "base/bind.h"
#include "base/command_line.h"
@@ -1309,16 +1307,30 @@ void SetDefaultX11ErrorHandlers() {
}
bool IsX11WindowFullScreen(XID window) {
- // First check if _NET_WM_STATE property contains _NET_WM_STATE_FULLSCREEN.
- static Atom atom = GetAtom("_NET_WM_STATE_FULLSCREEN");
-
- std::vector<Atom> atom_properties;
- if (GetAtomArrayProperty(window,
- "_NET_WM_STATE",
- &atom_properties) &&
- std::find(atom_properties.begin(), atom_properties.end(), atom)
- != atom_properties.end())
- return true;
+ // If _NET_WM_STATE_FULLSCREEN is in _NET_SUPPORTED, use the presence or
+ // absence of _NET_WM_STATE_FULLSCREEN in _NET_WM_STATE to determine
+ // whether we're fullscreen.
+ std::vector<Atom> supported_atoms;
+ if (GetAtomArrayProperty(GetX11RootWindow(),
+ "_NET_SUPPORTED",
+ &supported_atoms)) {
+ Atom atom = GetAtom("_NET_WM_STATE_FULLSCREEN");
+
+ if (std::find(supported_atoms.begin(), supported_atoms.end(), atom)
+ != supported_atoms.end()) {
+ std::vector<Atom> atom_properties;
+ if (GetAtomArrayProperty(window,
+ "_NET_WM_STATE",
+ &atom_properties)) {
+ return std::find(atom_properties.begin(), atom_properties.end(), atom)
+ != atom_properties.end();
+ }
+ }
+ }
+
+ gfx::Rect window_rect;
+ if (!ui::GetWindowRect(window, &window_rect))
+ return false;
#if defined(TOOLKIT_GTK)
// As the last resort, check if the window size is as large as the main
@@ -1326,17 +1338,21 @@ bool IsX11WindowFullScreen(XID window) {
GdkRectangle monitor_rect;
gdk_screen_get_monitor_geometry(gdk_screen_get_default(), 0, &monitor_rect);
- gfx::Rect window_rect;
- if (!ui::GetWindowRect(window, &window_rect))
- return false;
-
return monitor_rect.x == window_rect.x() &&
monitor_rect.y == window_rect.y() &&
monitor_rect.width == window_rect.width() &&
monitor_rect.height == window_rect.height();
#else
- NOTIMPLEMENTED();
- return false;
+ // We can't use gfx::Screen here because we don't have an aura::Window. So
+ // instead just look at the size of the default display.
+ //
+ // TODO(erg): Actually doing this correctly would require pulling out xrandr,
+ // which we don't even do in the desktop screen yet.
+ ::Display* display = ui::GetXDisplay();
+ ::Screen* screen = DefaultScreenOfDisplay(display);
+ int width = WidthOfScreen(screen);
+ int height = HeightOfScreen(screen);
+ return window_rect.size() == gfx::Size(width, height);
#endif
}
diff --git a/ui/compositor/DEPS b/ui/compositor/DEPS
index 7dbb84f4d0..626b1978c9 100644
--- a/ui/compositor/DEPS
+++ b/ui/compositor/DEPS
@@ -3,9 +3,9 @@
# Compositor out of WebKit.
include_rules = [
"+cc",
- "+third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.h",
- "+third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations.h",
- "+third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h",
- "+third_party/WebKit/Source/Platform/chromium/public/WebString.h",
+ "+third_party/WebKit/public/platform/WebFilterOperation.h",
+ "+third_party/WebKit/public/platform/WebFilterOperations.h",
+ "+third_party/WebKit/public/platform/WebGraphicsContext3D.h",
+ "+third_party/WebKit/public/platform/WebString.h",
"+webkit/common/gpu",
]
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index d6054784d6..2a2dd0342d 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -210,13 +210,23 @@ WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateOffscreenContext() {
return CreateContextCommon(NULL, true);
}
+scoped_refptr<Reflector> DefaultContextFactory::CreateReflector(
+ Compositor* mirroed_compositor,
+ Layer* mirroring_layer) {
+ return NULL;
+}
+
+void DefaultContextFactory::RemoveReflector(
+ scoped_refptr<Reflector> reflector) {
+}
+
scoped_refptr<cc::ContextProvider>
DefaultContextFactory::OffscreenContextProviderForMainThread() {
- if (!offscreen_contexts_main_thread_ ||
+ if (!offscreen_contexts_main_thread_.get() ||
!offscreen_contexts_main_thread_->DestroyedOnMainThread()) {
offscreen_contexts_main_thread_ =
ContextProviderFromContextFactory::Create(this);
- if (offscreen_contexts_main_thread_ &&
+ if (offscreen_contexts_main_thread_.get() &&
!offscreen_contexts_main_thread_->BindToCurrentThread())
offscreen_contexts_main_thread_ = NULL;
}
@@ -225,7 +235,7 @@ DefaultContextFactory::OffscreenContextProviderForMainThread() {
scoped_refptr<cc::ContextProvider>
DefaultContextFactory::OffscreenContextProviderForCompositorThread() {
- if (!offscreen_contexts_compositor_thread_ ||
+ if (!offscreen_contexts_compositor_thread_.get() ||
!offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) {
offscreen_contexts_compositor_thread_ =
ContextProviderFromContextFactory::Create(this);
@@ -281,9 +291,18 @@ WebKit::WebGraphicsContext3D* TestContextFactory::CreateOffscreenContext() {
return context;
}
+scoped_refptr<Reflector> TestContextFactory::CreateReflector(
+ Compositor* mirrored_compositor,
+ Layer* mirroring_layer) {
+ return new Reflector();
+}
+
+void TestContextFactory::RemoveReflector(scoped_refptr<Reflector> reflector) {
+}
+
scoped_refptr<cc::ContextProvider>
TestContextFactory::OffscreenContextProviderForMainThread() {
- if (!offscreen_contexts_main_thread_ ||
+ if (!offscreen_contexts_main_thread_.get() ||
offscreen_contexts_main_thread_->DestroyedOnMainThread()) {
offscreen_contexts_main_thread_ =
ContextProviderFromContextFactory::Create(this);
@@ -294,7 +313,7 @@ TestContextFactory::OffscreenContextProviderForMainThread() {
scoped_refptr<cc::ContextProvider>
TestContextFactory::OffscreenContextProviderForCompositorThread() {
- if (!offscreen_contexts_compositor_thread_ ||
+ if (!offscreen_contexts_compositor_thread_.get() ||
offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) {
offscreen_contexts_compositor_thread_ =
ContextProviderFromContextFactory::Create(this);
@@ -544,6 +563,14 @@ bool Compositor::WasInitializedWithThread() {
}
// static
+scoped_refptr<base::MessageLoopProxy> Compositor::GetCompositorMessageLoop() {
+ scoped_refptr<base::MessageLoopProxy> proxy;
+ if (g_compositor_thread)
+ proxy = g_compositor_thread->message_loop_proxy();
+ return proxy;
+}
+
+// static
void Compositor::Terminate() {
if (g_compositor_thread) {
g_compositor_thread->Stop();
@@ -615,6 +642,10 @@ void Compositor::ScheduleRedrawRect(const gfx::Rect& damage_rect) {
host_->SetNeedsRedrawRect(damage_rect);
}
+void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) {
+ host_->SetLatencyInfo(latency_info);
+}
+
bool Compositor::ReadPixels(SkBitmap* bitmap,
const gfx::Rect& bounds_in_pixel) {
if (bounds_in_pixel.right() > size().width() ||
diff --git a/ui/compositor/compositor.gyp b/ui/compositor/compositor.gyp
index 226b2c49a6..65a4344478 100644
--- a/ui/compositor/compositor.gyp
+++ b/ui/compositor/compositor.gyp
@@ -15,7 +15,7 @@
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/cc/cc.gyp:cc',
'<(DEPTH)/skia/skia.gyp:skia',
- '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
+ '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
'<(DEPTH)/ui/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui',
'<(DEPTH)/webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
@@ -79,28 +79,17 @@
'type': 'static_library',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_support',
- '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
+ '<(DEPTH)/skia/skia.gyp:skia',
+ '<(DEPTH)/ui/gl/gl.gyp:gl',
+ '<(DEPTH)/ui/ui.gyp:ui',
+ 'compositor',
],
'sources': [
- 'test/compositor_test_support.cc',
- 'test/compositor_test_support.h',
'test/test_layers.cc',
'test/test_layers.h',
'test/test_suite.cc',
'test/test_suite.h',
],
- 'conditions': [
- ['os_posix == 1 and OS != "mac"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '<(DEPTH)/base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
},
{
'target_name': 'compositor_unittests',
@@ -144,6 +133,15 @@
'<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
],
}],
+ ['os_posix == 1 and OS != "mac"', {
+ 'conditions': [
+ ['linux_use_tcmalloc==1', {
+ 'dependencies': [
+ '<(DEPTH)/base/allocator/allocator.gyp:allocator',
+ ],
+ }],
+ ],
+ }],
],
},
],
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 4ec56e04e4..8e59b7e574 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -25,6 +25,7 @@
class SkBitmap;
namespace base {
+class MessageLoopProxy;
class RunLoop;
}
@@ -41,6 +42,7 @@ class GLSurface;
class GLShareGroup;
class Point;
class Rect;
+class Size;
}
namespace WebKit {
@@ -54,6 +56,9 @@ class CompositorObserver;
class ContextProviderFromContextFactory;
class Layer;
class PostedSwapQueue;
+class Reflector;
+class Texture;
+struct LatencyInfo;
// This class abstracts the creation of the 3D context for the compositor. It is
// a global object.
@@ -79,6 +84,14 @@ class COMPOSITOR_EXPORT ContextFactory {
// with all compositors.
virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() = 0;
+ // Creates a reflector that copies the content of the |mirrored_compositor|
+ // onto |mirroing_layer|.
+ virtual scoped_refptr<Reflector> CreateReflector(
+ Compositor* mirrored_compositor,
+ Layer* mirroring_layer) = 0;
+ // Removes the reflector, which stops the mirroring.
+ virtual void RemoveReflector(scoped_refptr<Reflector> reflector) = 0;
+
virtual scoped_refptr<cc::ContextProvider>
OffscreenContextProviderForMainThread() = 0;
virtual scoped_refptr<cc::ContextProvider>
@@ -98,6 +111,12 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
virtual cc::OutputSurface* CreateOutputSurface(
Compositor* compositor) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE;
+
+ virtual scoped_refptr<Reflector> CreateReflector(
+ Compositor* compositor,
+ Layer* layer) OVERRIDE;
+ virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
+
virtual scoped_refptr<cc::ContextProvider>
OffscreenContextProviderForMainThread() OVERRIDE;
virtual scoped_refptr<cc::ContextProvider>
@@ -129,6 +148,12 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory {
virtual cc::OutputSurface* CreateOutputSurface(
Compositor* compositor) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE;
+
+ virtual scoped_refptr<Reflector> CreateReflector(
+ Compositor* mirrored_compositor,
+ Layer* mirroring_layer) OVERRIDE;
+ virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
+
virtual scoped_refptr<cc::ContextProvider>
OffscreenContextProviderForMainThread() OVERRIDE;
virtual scoped_refptr<cc::ContextProvider>
@@ -188,6 +213,20 @@ class COMPOSITOR_EXPORT CompositorDelegate {
virtual ~CompositorDelegate() {}
};
+class COMPOSITOR_EXPORT Reflector
+ : public base::RefCountedThreadSafe<Reflector> {
+ public:
+ Reflector() {}
+
+ virtual void OnMirroringCompositorResized() {}
+
+ protected:
+ friend class base::RefCountedThreadSafe<Reflector>;
+ virtual ~Reflector() {}
+
+ DISALLOW_COPY_AND_ASSIGN(Reflector);
+};
+
// This class represents a lock on the compositor, that can be used to prevent
// commits to the compositor tree while we're waiting for an asynchronous
// event. The typical use case is when waiting for a renderer to produce a frame
@@ -260,6 +299,7 @@ class COMPOSITOR_EXPORT Compositor
static void Initialize();
static bool WasInitializedWithThread();
+ static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop();
static void Terminate();
// Schedules a redraw of the layer tree associated with this compositor.
@@ -295,6 +335,8 @@ class COMPOSITOR_EXPORT Compositor
// from changes to layer properties.
void ScheduleRedrawRect(const gfx::Rect& damage_rect);
+ void SetLatencyInfo(const ui::LatencyInfo& latency_info);
+
// Reads the region |bounds_in_pixel| of the contents of the last rendered
// frame into the given bitmap.
// Returns false if the pixels could not be read.
diff --git a/ui/compositor/debug_utils.cc b/ui/compositor/debug_utils.cc
index f80be6a507..016ff17eeb 100644
--- a/ui/compositor/debug_utils.cc
+++ b/ui/compositor/debug_utils.cc
@@ -12,7 +12,7 @@
#include <string>
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/interpolated_transform.h"
#include "ui/gfx/point.h"
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 6a3308e083..3949402e49 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -17,8 +17,8 @@
#include "cc/layers/texture_layer.h"
#include "cc/output/delegated_frame_data.h"
#include "cc/resources/transferable_resource.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations.h"
+#include "third_party/WebKit/public/platform/WebFilterOperation.h"
+#include "third_party/WebKit/public/platform/WebFilterOperations.h"
#include "ui/base/animation/animation.h"
#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/dip_util.h"
@@ -86,6 +86,7 @@ Layer::Layer(LayerType type)
zoom_(1),
zoom_inset_(0),
delegate_(NULL),
+ cc_layer_(NULL),
scale_content_(true),
device_scale_factor_(1.0f) {
CreateWebLayer();
@@ -95,7 +96,7 @@ Layer::~Layer() {
// Destroying the animator may cause observers to use the layer (and
// indirectly the WebLayer). Destroy the animator first so that the WebLayer
// is still around.
- if (animator_)
+ if (animator_.get())
animator_->SetDelegate(NULL);
animator_ = NULL;
if (compositor_)
@@ -444,7 +445,7 @@ void Layer::SetFillsBoundsOpaquely(bool fills_bounds_opaquely) {
void Layer::SwitchToLayer(scoped_refptr<cc::Layer> new_layer) {
// Finish animations being handled by cc_layer_.
- if (animator_) {
+ if (animator_.get()) {
animator_->StopAnimatingProperty(LayerAnimationElement::TRANSFORM);
animator_->StopAnimatingProperty(LayerAnimationElement::OPACITY);
}
@@ -463,7 +464,7 @@ void Layer::SwitchToLayer(scoped_refptr<cc::Layer> new_layer) {
new_layer->SetTransform(cc_layer_->transform());
new_layer->SetPosition(cc_layer_->position());
- cc_layer_= new_layer;
+ cc_layer_ = new_layer.get();
content_layer_ = NULL;
solid_color_layer_ = NULL;
texture_layer_ = NULL;
@@ -492,11 +493,11 @@ void Layer::SetExternalTexture(Texture* texture) {
scoped_refptr<ui::Texture> old_texture = texture_;
DCHECK_EQ(type_, LAYER_TEXTURED);
- DCHECK(!solid_color_layer_);
+ DCHECK(!solid_color_layer_.get());
bool has_texture = !!texture;
layer_updated_externally_ = has_texture;
texture_ = texture;
- if (!!texture_layer_ != has_texture) {
+ if (!!texture_layer_.get() != has_texture) {
// Switch to a different type of layer.
if (has_texture) {
scoped_refptr<cc::TextureLayer> new_layer =
@@ -514,13 +515,39 @@ void Layer::SetExternalTexture(Texture* texture) {
RecomputeDrawsContentAndUVRect();
}
+void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
+ float scale_factor) {
+ DCHECK_EQ(type_, LAYER_TEXTURED);
+ DCHECK(!solid_color_layer_);
+ layer_updated_externally_ = true;
+ texture_ = NULL;
+ if (!texture_layer_ || !texture_layer_->uses_mailbox()) {
+ scoped_refptr<cc::TextureLayer> new_layer =
+ cc::TextureLayer::CreateForMailbox(this);
+ new_layer->SetFlipped(false);
+ SwitchToLayer(new_layer);
+ texture_layer_ = new_layer;
+ }
+ texture_layer_->SetTextureMailbox(mailbox);
+ mailbox_ = mailbox;
+ mailbox_scale_factor_ = scale_factor;
+ RecomputeDrawsContentAndUVRect();
+}
+
+cc::TextureMailbox Layer::GetTextureMailbox(float* scale_factor) {
+ if (scale_factor)
+ *scale_factor = mailbox_scale_factor_;
+ cc::TextureMailbox::ReleaseCallback callback;
+ return mailbox_.CopyWithNewCallback(callback);
+}
+
void Layer::SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame,
gfx::Size frame_size_in_dip) {
DCHECK_EQ(type_, LAYER_TEXTURED);
bool has_frame = frame.get() && !frame->render_pass_list.empty();
layer_updated_externally_ = has_frame;
delegated_frame_size_in_dip_ = frame_size_in_dip;
- if (!!delegated_renderer_layer_ != has_frame) {
+ if (!!delegated_renderer_layer_.get() != has_frame) {
if (has_frame) {
scoped_refptr<cc::DelegatedRendererLayer> new_layer =
cc::DelegatedRendererLayer::Create(NULL);
@@ -540,7 +567,7 @@ void Layer::SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame,
void Layer::TakeUnusedResourcesForChildCompositor(
cc::TransferableResourceArray* list) {
- if (delegated_renderer_layer_)
+ if (delegated_renderer_layer_.get())
delegated_renderer_layer_->TakeUnusedResourcesForChildCompositor(list);
}
@@ -549,7 +576,7 @@ void Layer::SetColor(SkColor color) {
}
bool Layer::SchedulePaint(const gfx::Rect& invalid_rect) {
- if (type_ == LAYER_SOLID_COLOR || (!delegate_ && !texture_))
+ if (type_ == LAYER_SOLID_COLOR || (!delegate_ && !texture_.get()))
return false;
damaged_region_.op(invalid_rect.x(),
@@ -568,9 +595,8 @@ void Layer::ScheduleDraw() {
}
void Layer::SendDamagedRects() {
- if ((delegate_ || texture_) && !damaged_region_.isEmpty()) {
- for (SkRegion::Iterator iter(damaged_region_);
- !iter.done(); iter.next()) {
+ if ((delegate_ || texture_.get()) && !damaged_region_.isEmpty()) {
+ for (SkRegion::Iterator iter(damaged_region_); !iter.done(); iter.next()) {
const SkIRect& sk_damaged = iter.rect();
gfx::Rect damaged(
sk_damaged.x(),
@@ -598,7 +624,7 @@ void Layer::SuppressPaint() {
void Layer::OnDeviceScaleFactorChanged(float device_scale_factor) {
if (device_scale_factor_ == device_scale_factor)
return;
- if (animator_)
+ if (animator_.get())
animator_->StopAnimatingProperty(LayerAnimationElement::TRANSFORM);
gfx::Transform transform = this->transform();
device_scale_factor_ = device_scale_factor;
@@ -635,13 +661,15 @@ void Layer::PaintContents(SkCanvas* sk_canvas,
}
unsigned Layer::PrepareTexture(cc::ResourceUpdateQueue* queue) {
- DCHECK(texture_layer_);
+ DCHECK(texture_layer_.get());
return texture_->PrepareTexture();
}
WebKit::WebGraphicsContext3D* Layer::Context3d() {
- DCHECK(texture_layer_);
- return texture_->HostContext3D();
+ DCHECK(texture_layer_.get());
+ if (texture_)
+ return texture_->HostContext3D();
+ return NULL;
}
bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox) {
@@ -657,7 +685,7 @@ void Layer::SetForceRenderSurface(bool force) {
}
void Layer::OnAnimationStarted(const cc::AnimationEvent& event) {
- if (animator_)
+ if (animator_.get())
animator_->OnThreadedAnimationStarted(event);
}
@@ -919,12 +947,19 @@ void Layer::RecomputeDrawsContentAndUVRect() {
DCHECK(cc_layer_);
gfx::Size size(bounds_.size());
if (texture_layer_.get()) {
- DCHECK(texture_);
-
- float texture_scale_factor = 1.0f / texture_->device_scale_factor();
- gfx::Size texture_size = gfx::ToFlooredSize(
- gfx::ScaleSize(texture_->size(), texture_scale_factor));
- size.ClampToMax(texture_size);
+ gfx::Size texture_size;
+ if (!texture_layer_->uses_mailbox()) {
+ DCHECK(texture_);
+ float texture_scale_factor = 1.0f / texture_->device_scale_factor();
+ texture_size = gfx::ToFlooredSize(
+ gfx::ScaleSize(texture_->size(), texture_scale_factor));
+ } else {
+ DCHECK(mailbox_.IsSharedMemory());
+ float texture_scale_factor = 1.0f / mailbox_scale_factor_;
+ texture_size = gfx::ToFlooredSize(
+ gfx::ScaleSize(mailbox_.shared_memory_size(), texture_scale_factor));
+ }
+ size.SetToMin(texture_size);
gfx::PointF uv_top_left(0.f, 0.f);
gfx::PointF uv_bottom_right(
@@ -934,7 +969,7 @@ void Layer::RecomputeDrawsContentAndUVRect() {
} else if (delegated_renderer_layer_.get()) {
delegated_renderer_layer_->SetDisplaySize(
ConvertSizeToPixel(this, delegated_frame_size_in_dip_));
- size.ClampToMax(delegated_frame_size_in_dip_);
+ size.SetToMin(delegated_frame_size_in_dip_);
}
cc_layer_->SetBounds(ConvertSizeToPixel(this, size));
}
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index a5afd6b86c..1159d0b485 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -17,6 +17,7 @@
#include "cc/base/scoped_ptr_vector.h"
#include "cc/layers/content_layer_client.h"
#include "cc/layers/texture_layer_client.h"
+#include "cc/resources/texture_mailbox.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/compositor/compositor.h"
@@ -250,6 +251,11 @@ class COMPOSITOR_EXPORT Layer
void SetExternalTexture(ui::Texture* texture);
ui::Texture* external_texture() { return texture_.get(); }
+ // Set new TextureMailbox for this layer. Note that |mailbox| may hold a
+ // shared memory resource or an actual mailbox for a texture.
+ void SetTextureMailbox(const cc::TextureMailbox& mailbox, float scale_factor);
+ cc::TextureMailbox GetTextureMailbox(float* scale_factor);
+
// Sets a delegated frame, coming from a child compositor.
void SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame,
gfx::Size frame_size_in_dip);
@@ -465,6 +471,12 @@ class COMPOSITOR_EXPORT Layer
// A cached copy of |Compositor::device_scale_factor()|.
float device_scale_factor_;
+ // A cached copy of the TextureMailbox given texture_layer_.
+ cc::TextureMailbox mailbox_;
+
+ // Device scale factor in which mailbox_ was rendered in.
+ float mailbox_scale_factor_;
+
// The size of the delegated frame in DIP, set when SetDelegatedFrame was
// called.
gfx::Size delegated_frame_size_in_dip_;
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index f5d9b4cf57..4b1e981223 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -601,15 +601,16 @@ void LayerAnimator::RemoveAllAnimationsWithACommonProperty(
sequences.push_back((*queue_iter)->AsWeakPtr());
for (size_t i = 0; i < sequences.size(); ++i) {
- if (!sequences[i] || !HasAnimation(sequences[i]))
+ if (!sequences[i].get() || !HasAnimation(sequences[i].get()))
continue;
if (sequences[i]->HasConflictingProperty(sequence->properties())) {
- scoped_ptr<LayerAnimationSequence> removed(RemoveAnimation(sequences[i]));
+ scoped_ptr<LayerAnimationSequence> removed(
+ RemoveAnimation(sequences[i].get()));
if (abort)
sequences[i]->Abort(delegate());
else
- ProgressAnimationToEnd(sequences[i]);
+ ProgressAnimationToEnd(sequences[i].get());
}
}
}
@@ -621,16 +622,16 @@ void LayerAnimator::ImmediatelySetNewTarget(LayerAnimationSequence* sequence) {
const bool abort = false;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
LayerAnimationSequence* removed = RemoveAnimation(sequence);
DCHECK(removed == NULL || removed == sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
ProgressAnimationToEnd(sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
delete sequence;
@@ -644,11 +645,11 @@ void LayerAnimator::ImmediatelyAnimateToNewTarget(
const bool abort = true;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
AddToQueueIfNotPresent(sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
StartSequenceImmediately(sequence);
@@ -672,7 +673,7 @@ void LayerAnimator::ReplaceQueuedAnimations(LayerAnimationSequence* sequence) {
// animation_queue_.size() - i is always decreasing and we are always making
// progress towards the loop terminating.
for (size_t i = 0; i < animation_queue_.size();) {
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
break;
PurgeDeletedAnimations();
@@ -719,7 +720,7 @@ void LayerAnimator::ProcessQueue() {
sequences.push_back((*queue_iter)->AsWeakPtr());
for (size_t i = 0; i < sequences.size(); ++i) {
- if (!sequences[i] || !HasAnimation(sequences[i]))
+ if (!sequences[i].get() || !HasAnimation(sequences[i].get()))
continue;
if (!sequences[i]->HasConflictingProperty(animated)) {
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index d71a936fd6..0d183b9d97 100644
--- a/ui/compositor/layer_animator.h
+++ b/ui/compositor/layer_animator.h
@@ -209,7 +209,7 @@ class COMPOSITOR_EXPORT LayerAnimator
RunningAnimation(const base::WeakPtr<LayerAnimationSequence>& sequence);
~RunningAnimation();
- bool is_sequence_alive() const { return !!sequence_; }
+ bool is_sequence_alive() const { return !!sequence_.get(); }
LayerAnimationSequence* sequence() const { return sequence_.get(); }
private:
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc
index c7d94fe488..0b0df2cb02 100644
--- a/ui/compositor/layer_animator_unittest.cc
+++ b/ui/compositor/layer_animator_unittest.cc
@@ -2308,7 +2308,7 @@ TEST(LayerAnimatorTest, TestSetterRespectEnqueueStrategy) {
delegate.SetOpacityFromAnimation(start_opacity);
- ScopedLayerAnimationSettings settings(animator);
+ ScopedLayerAnimationSettings settings(animator.get());
settings.SetPreemptionStrategy(
LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
settings.SetTransitionDuration(base::TimeDelta::FromSeconds(1));
diff --git a/ui/compositor/test/compositor_test_support.cc b/ui/compositor/test/compositor_test_support.cc
deleted file mode 100644
index 0ac26095ad..0000000000
--- a/ui/compositor/test/compositor_test_support.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 "ui/compositor/test/compositor_test_support.h"
-
-#include "base/compiler_specific.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
-#include "webkit/glue/webkitplatformsupport_impl.h"
-
-namespace ui {
-
-class CompositorTestPlatformSupport:
- public NON_EXPORTED_BASE(webkit_glue::WebKitPlatformSupportImpl) {
- public:
- virtual string16 GetLocalizedString(int message_id) OVERRIDE {
- return string16();
- }
-
- virtual base::StringPiece GetDataResource(
- int resource_id,
- ui::ScaleFactor scale_factor) OVERRIDE {
- return base::StringPiece();
- }
-
- virtual void GetPlugins(
- bool refresh, std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE {
- }
-
- virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
- OVERRIDE {
- NOTREACHED();
- return NULL;
- }
-
- virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
- WebKit::WebSocketStreamHandle* handle,
- webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE {
- NOTREACHED();
- return NULL;
- }
-};
-
-static CompositorTestPlatformSupport* g_webkit_support;
-
-void CompositorTestSupport::Initialize() {
- DCHECK(!g_webkit_support);
- g_webkit_support = new CompositorTestPlatformSupport;
- WebKit::initialize(g_webkit_support);
-}
-
-void CompositorTestSupport::Terminate() {
- DCHECK(g_webkit_support);
- WebKit::shutdown();
- delete g_webkit_support;
- g_webkit_support = NULL;
-}
-
-} // namespace ui
diff --git a/ui/compositor/test/compositor_test_support.h b/ui/compositor/test/compositor_test_support.h
deleted file mode 100644
index e0923400cd..0000000000
--- a/ui/compositor/test/compositor_test_support.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 UI_COMPOSITOR_TEST_COMPOSITOR_TEST_SUPPORT_H_
-#define UI_COMPOSITOR_TEST_COMPOSITOR_TEST_SUPPORT_H_
-
-namespace ui {
-
-class CompositorTestSupport {
- public:
- // Called by programs that want to use a real compositor,
- // but skip the typical initialization of browser_main.cc.
- static void Initialize();
- static void Terminate();
-};
-
-} // namespace ui
-
-#endif // UI_COMPOSITOR_TEST_COMPOSITOR_TEST_SUPPORT_H_
diff --git a/ui/compositor/test/test_suite.cc b/ui/compositor/test/test_suite.cc
index 516cafc64a..e6ca68cdd1 100644
--- a/ui/compositor/test/test_suite.cc
+++ b/ui/compositor/test/test_suite.cc
@@ -9,7 +9,6 @@
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_switches.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/gfx/gfx_paths.h"
#include "ui/gl/gl_implementation.h"
@@ -37,13 +36,11 @@ void CompositorTestSuite::Initialize() {
gfx::RegisterPathProvider();
message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
- CompositorTestSupport::Initialize();
Compositor::Initialize();
}
void CompositorTestSuite::Shutdown() {
Compositor::Terminate();
- CompositorTestSupport::Terminate();
message_loop_.reset();
base::TestSuite::Shutdown();
diff --git a/ui/compositor/test_web_graphics_context_3d.cc b/ui/compositor/test_web_graphics_context_3d.cc
index 7778d56c80..409ca64e2d 100644
--- a/ui/compositor/test_web_graphics_context_3d.cc
+++ b/ui/compositor/test_web_graphics_context_3d.cc
@@ -33,10 +33,6 @@ int TestWebGraphicsContext3D::height() {
return 0;
}
-bool TestWebGraphicsContext3D::isGLES2Compliant() {
- return false;
-}
-
bool TestWebGraphicsContext3D::readBackFramebuffer(
unsigned char* pixels,
size_t bufferSize,
@@ -46,10 +42,6 @@ bool TestWebGraphicsContext3D::readBackFramebuffer(
return false;
}
-WebKit::WebGLId TestWebGraphicsContext3D::getPlatformTextureId() {
- return 0;
-}
-
bool TestWebGraphicsContext3D::isContextLost() {
return false;
}
diff --git a/ui/compositor/test_web_graphics_context_3d.h b/ui/compositor/test_web_graphics_context_3d.h
index a95b304349..e2607c74c0 100644
--- a/ui/compositor/test_web_graphics_context_3d.h
+++ b/ui/compositor/test_web_graphics_context_3d.h
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
+#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "ui/compositor/compositor_export.h"
namespace gfx {
@@ -30,13 +30,11 @@ class COMPOSITOR_EXPORT TestWebGraphicsContext3D :
virtual int width();
virtual int height();
virtual void reshape(int width, int height) {}
- virtual bool isGLES2Compliant();
virtual bool readBackFramebuffer(unsigned char* pixels,
size_t bufferSize,
WebKit::WebGLId framebuffer,
int width,
int height);
- virtual WebKit::WebGLId getPlatformTextureId();
virtual void prepareTexture() {}
virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) {}
virtual void synthesizeGLError(WebKit::WGC3Denum value) {}
diff --git a/ui/gfx/OWNERS b/ui/gfx/OWNERS
index ce6d0f7f3f..fa08e88ba7 100644
--- a/ui/gfx/OWNERS
+++ b/ui/gfx/OWNERS
@@ -13,3 +13,7 @@ xji@chromium.org
# Display and related classes.
per-file display*=oshima@chromium.org
per-file screen*=oshima@chromium.org
+
+# Transform, interpolated transform and transform util.
+per-file transform*=vollick@chromium.org
+per-file interpolated_transform*=vollick@chromium.org
diff --git a/ui/gfx/android/device_display_info.cc b/ui/gfx/android/device_display_info.cc
index b6866a9732..16fd2acb1d 100644
--- a/ui/gfx/android/device_display_info.cc
+++ b/ui/gfx/android/device_display_info.cc
@@ -58,13 +58,6 @@ double DeviceDisplayInfo::GetDIPScale() {
return static_cast<double>(result);
}
-double DeviceDisplayInfo::GetRefreshRate() {
- JNIEnv* env = AttachCurrentThread();
- jdouble result =
- Java_DeviceDisplayInfo_getRefreshRate(env, j_device_info_.obj());
- return static_cast<double>(result);
-}
-
// static
bool DeviceDisplayInfo::RegisterDeviceDisplayInfo(JNIEnv* env) {
return RegisterNativesImpl(env);
diff --git a/ui/gfx/android/device_display_info.h b/ui/gfx/android/device_display_info.h
index f24b6437a7..af7bb622b2 100644
--- a/ui/gfx/android/device_display_info.h
+++ b/ui/gfx/android/device_display_info.h
@@ -37,9 +37,6 @@ class UI_EXPORT DeviceDisplayInfo {
// (1.0 is 160dpi, 0.75 is 120dpi, 2.0 is 320dpi).
double GetDIPScale();
- // Returns display refresh rate in number of frames per second.
- double GetRefreshRate();
-
// Registers methods with JNI and returns true if succeeded.
static bool RegisterDeviceDisplayInfo(JNIEnv* env);
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index aac2c035bb..2b0f5046cf 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -87,7 +87,7 @@ void Canvas::RecreateBackingCanvas(const gfx::Size& size,
}
// static
-int Canvas::GetStringWidth(const string16& text, const gfx::Font& font) {
+int Canvas::GetStringWidth(const base::string16& text, const gfx::Font& font) {
int width = 0, height = 0;
Canvas::SizeStringInt(text, font, &width, &height, 0, NO_ELLIPSIS);
return width;
@@ -409,14 +409,14 @@ void Canvas::DrawImageInPath(const gfx::ImageSkia& image,
canvas_->drawPath(path, p);
}
-void Canvas::DrawStringInt(const string16& text,
+void Canvas::DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
int x, int y, int w, int h) {
DrawStringInt(text, font, color, x, y, w, h, DefaultCanvasTextAlignment());
}
-void Canvas::DrawStringInt(const string16& text,
+void Canvas::DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& display_rect) {
@@ -424,7 +424,7 @@ void Canvas::DrawStringInt(const string16& text,
display_rect.width(), display_rect.height());
}
-void Canvas::DrawStringInt(const string16& text,
+void Canvas::DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
int x, int y, int w, int h,
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 65fc15654c..1d7a14266c 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -126,7 +126,7 @@ class UI_EXPORT Canvas {
// height and then width as needed to make the text fit. This method
// supports multiple lines. On Skia only a line_height can be specified and
// specifying a 0 value for it will cause the default height to be used.
- static void SizeStringInt(const string16& text,
+ static void SizeStringInt(const base::string16& text,
const gfx::Font& font,
int* width, int* height,
int line_height,
@@ -134,7 +134,7 @@ class UI_EXPORT Canvas {
// Returns the number of horizontal pixels needed to display the specified
// |text| with |font|.
- static int GetStringWidth(const string16& text, const gfx::Font& font);
+ static int GetStringWidth(const base::string16& text, const gfx::Font& font);
// Returns the default text alignment to be used when drawing text on a
// gfx::Canvas based on the directionality of the system locale language.
@@ -154,7 +154,7 @@ class UI_EXPORT Canvas {
// On Mac, NOTIMPLEMENTED.
// TODO(dhollowa): Skia-native implementation is underway. Cut over to
// that when ready. http::/crbug.com/109946
- void DrawStringWithHalo(const string16& text,
+ void DrawStringWithHalo(const base::string16& text,
const gfx::Font& font,
SkColor text_color,
SkColor halo_color,
@@ -305,11 +305,11 @@ class UI_EXPORT Canvas {
// Draws text with the specified color, font and location. The text is
// aligned to the left, vertically centered, clipped to the region. If the
// text is too big, it is truncated and '...' is added to the end.
- void DrawStringInt(const string16& text,
+ void DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
int x, int y, int w, int h);
- void DrawStringInt(const string16& text,
+ void DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& display_rect);
@@ -317,7 +317,7 @@ class UI_EXPORT Canvas {
// Draws text with the specified color, font and location. The last argument
// specifies flags for how the text should be rendered. It can be one of
// TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT.
- void DrawStringInt(const string16& text,
+ void DrawStringInt(const base::string16& text,
const gfx::Font& font,
SkColor color,
int x, int y, int w, int h,
@@ -326,7 +326,7 @@ class UI_EXPORT Canvas {
// Similar to above DrawStringInt method but with text shadows support.
// Currently it's only implemented for canvas skia. Specifying a 0 line_height
// will cause the default height to be used.
- void DrawStringWithShadows(const string16& text,
+ void DrawStringWithShadows(const base::string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& text_bounds,
@@ -366,7 +366,7 @@ class UI_EXPORT Canvas {
// |desired_characters_to_truncate_from_head| specifies the maximum number of
// characters that can be truncated.
void DrawFadeTruncatingString(
- const string16& text,
+ const base::string16& text,
TruncateFadeMode truncate_mode,
size_t desired_characters_to_truncate_from_head,
const gfx::Font& font,
diff --git a/ui/gfx/canvas_android.cc b/ui/gfx/canvas_android.cc
index 0c339f9dc0..c26a668f1d 100644
--- a/ui/gfx/canvas_android.cc
+++ b/ui/gfx/canvas_android.cc
@@ -10,7 +10,7 @@
namespace gfx {
// static
-void Canvas::SizeStringInt(const string16& text,
+void Canvas::SizeStringInt(const base::string16& text,
const gfx::Font& font,
int* width,
int* height,
@@ -19,7 +19,7 @@ void Canvas::SizeStringInt(const string16& text,
NOTIMPLEMENTED();
}
-void Canvas::DrawStringWithShadows(const string16& text,
+void Canvas::DrawStringWithShadows(const base::string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& text_bounds,
diff --git a/ui/gfx/canvas_mac.mm b/ui/gfx/canvas_mac.mm
index f1ad6a80e9..a906873d4e 100644
--- a/ui/gfx/canvas_mac.mm
+++ b/ui/gfx/canvas_mac.mm
@@ -35,7 +35,7 @@ SkTypeface::Style FontTypefaceStyle(const gfx::Font& font) {
namespace gfx {
// static
-void Canvas::SizeStringInt(const string16& text,
+void Canvas::SizeStringInt(const base::string16& text,
const gfx::Font& font,
int* width,
int* height,
@@ -54,7 +54,7 @@ void Canvas::SizeStringInt(const string16& text,
*height = font.GetHeight();
}
-void Canvas::DrawStringWithShadows(const string16& text,
+void Canvas::DrawStringWithShadows(const base::string16& text,
const gfx::Font& font,
SkColor color,
const gfx::Rect& text_bounds,
@@ -72,13 +72,13 @@ void Canvas::DrawStringWithShadows(const string16& text,
paint.setTypeface(typeface.get());
paint.setColor(color);
canvas_->drawText(text.c_str(),
- text.size() * sizeof(string16::value_type),
+ text.size() * sizeof(base::string16::value_type),
text_bounds.x(),
text_bounds.bottom(),
paint);
}
-void Canvas::DrawStringWithHalo(const string16& text,
+void Canvas::DrawStringWithHalo(const base::string16& text,
const gfx::Font& font,
SkColor text_color,
SkColor halo_color,
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index baed1dd571..bb8ce7db5e 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -25,7 +25,7 @@ namespace {
// |flags| and |text| content.
// Returns true if the text will be rendered right-to-left.
// TODO(msw): Nix this, now that RenderTextWin supports directionality directly.
-bool AdjustStringDirection(int flags, string16* text) {
+bool AdjustStringDirection(int flags, base::string16* text) {
// TODO(msw): FORCE_LTR_DIRECTIONALITY does not work for RTL text now.
// If the string is empty or LTR was forced, simply return false since the
@@ -85,7 +85,7 @@ bool PixelShouldGetHalo(const SkBitmap& bitmap,
// Strips accelerator character prefixes in |text| if needed, based on |flags|.
// Returns a range in |text| to underline or ui::Range::InvalidRange() if
// underlining is not needed.
-ui::Range StripAcceleratorChars(int flags, string16* text) {
+ui::Range StripAcceleratorChars(int flags, base::string16* text) {
if (flags & (Canvas::SHOW_PREFIX | Canvas::HIDE_PREFIX)) {
int char_pos = -1;
int char_span = 0;
@@ -100,9 +100,10 @@ ui::Range StripAcceleratorChars(int flags, string16* text) {
// to no longer point to the same character in |text|, |range| is made invalid.
void ElideTextAndAdjustRange(const Font& font,
int width,
- string16* text,
+ base::string16* text,
ui::Range* range) {
- const char16 start_char = (range->IsValid() ? text->at(range->start()) : 0);
+ const base::char16 start_char =
+ (range->IsValid() ? text->at(range->start()) : 0);
*text = ui::ElideText(*text, font, width, ui::ELIDE_AT_END);
if (!range->IsValid())
return;
@@ -114,7 +115,7 @@ void ElideTextAndAdjustRange(const Font& font,
// Updates |render_text| from the specified parameters.
void UpdateRenderText(const Rect& rect,
- const string16& text,
+ const base::string16& text,
const Font& font,
int flags,
SkColor color,
@@ -152,11 +153,11 @@ void UpdateRenderText(const Rect& rect,
}
// Returns updated |flags| to match platform-specific expected behavior.
-int AdjustPlatformSpecificFlags(const string16& text, int flags) {
+int AdjustPlatformSpecificFlags(const base::string16& text, int flags) {
#if defined(OS_LINUX)
// TODO(asvitkine): ash/tooltips/tooltip_controller.cc adds \n's to the string
// without passing MULTI_LINE.
- if (text.find('\n') != string16::npos)
+ if (text.find('\n') != base::string16::npos)
flags |= Canvas::MULTI_LINE;
#endif
@@ -166,7 +167,7 @@ int AdjustPlatformSpecificFlags(const string16& text, int flags) {
} // namespace
// static
-void Canvas::SizeStringInt(const string16& text,
+void Canvas::SizeStringInt(const base::string16& text,
const Font& font,
int* width, int* height,
int line_height,
@@ -176,7 +177,7 @@ void Canvas::SizeStringInt(const string16& text,
flags = AdjustPlatformSpecificFlags(text, flags);
- string16 adjusted_text = text;
+ base::string16 adjusted_text = text;
#if defined(OS_WIN)
AdjustStringDirection(flags, &adjusted_text);
#endif
@@ -189,11 +190,11 @@ void Canvas::SizeStringInt(const string16& text,
wrap_behavior = ui::ELIDE_LONG_WORDS;
Rect rect(*width, INT_MAX);
- std::vector<string16> strings;
+ std::vector<base::string16> strings;
ui::ElideRectangleText(adjusted_text, font, rect.width(), rect.height(),
wrap_behavior, &strings);
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
- UpdateRenderText(rect, string16(), font, flags, 0, render_text.get());
+ UpdateRenderText(rect, base::string16(), font, flags, 0, render_text.get());
int h = 0;
int w = 0;
@@ -225,7 +226,7 @@ void Canvas::SizeStringInt(const string16& text,
}
}
-void Canvas::DrawStringWithShadows(const string16& text,
+void Canvas::DrawStringWithShadows(const base::string16& text,
const Font& font,
SkColor color,
const Rect& text_bounds,
@@ -244,7 +245,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
ClipRect(clip_rect);
Rect rect(text_bounds);
- string16 adjusted_text = text;
+ base::string16 adjusted_text = text;
#if defined(OS_WIN)
AdjustStringDirection(flags, &adjusted_text);
@@ -260,7 +261,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
else if (!(flags & NO_ELLIPSIS))
wrap_behavior = ui::ELIDE_LONG_WORDS;
- std::vector<string16> strings;
+ std::vector<base::string16> strings;
ui::ElideRectangleText(adjusted_text,
font,
text_bounds.width(), text_bounds.height(),
@@ -332,7 +333,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
canvas_->restore();
}
-void Canvas::DrawStringWithHalo(const string16& text,
+void Canvas::DrawStringWithHalo(const base::string16& text,
const Font& font,
SkColor text_color,
SkColor halo_color_in,
@@ -379,7 +380,7 @@ void Canvas::DrawStringWithHalo(const string16& text,
}
void Canvas::DrawFadeTruncatingString(
- const string16& text,
+ const base::string16& text,
TruncateFadeMode truncate_mode,
size_t desired_characters_to_truncate_from_head,
const Font& font,
@@ -395,7 +396,7 @@ void Canvas::DrawFadeTruncatingString(
}
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
- string16 clipped_text = text;
+ base::string16 clipped_text = text;
const bool is_rtl = AdjustStringDirection(flags, &clipped_text);
switch (truncate_mode) {
diff --git a/ui/gfx/canvas_unittest.cc b/ui/gfx/canvas_unittest.cc
index 2d02725c35..21b9f51e57 100644
--- a/ui/gfx/canvas_unittest.cc
+++ b/ui/gfx/canvas_unittest.cc
@@ -4,7 +4,7 @@
#include <limits>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -18,9 +18,10 @@ class CanvasTest : public testing::Test {
}
gfx::Size SizeStringInt(const char *text, int width, int line_height) {
- string16 text16 = UTF8ToUTF16(text);
+ base::string16 text16 = UTF8ToUTF16(text);
int height = 0;
- int flags = (text16.find('\n') != string16::npos) ? Canvas::MULTI_LINE : 0;
+ int flags =
+ (text16.find('\n') != base::string16::npos) ? Canvas::MULTI_LINE : 0;
Canvas::SizeStringInt(text16, font_, &width, &height, line_height, flags);
return gfx::Size(width, height);
}
diff --git a/ui/gfx/font.cc b/ui/gfx/font.cc
index 424d5852d5..aa4638c7ef 100644
--- a/ui/gfx/font.cc
+++ b/ui/gfx/font.cc
@@ -4,7 +4,7 @@
#include "ui/gfx/font.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/platform_font.h"
namespace gfx {
@@ -58,7 +58,7 @@ int Font::GetAverageCharacterWidth() const {
return platform_font_->GetAverageCharacterWidth();
}
-int Font::GetStringWidth(const string16& text) const {
+int Font::GetStringWidth(const base::string16& text) const {
return platform_font_->GetStringWidth(text);
}
diff --git a/ui/gfx/font.h b/ui/gfx/font.h
index c05e76c5c1..e23465fbfc 100644
--- a/ui/gfx/font.h
+++ b/ui/gfx/font.h
@@ -74,7 +74,7 @@ class UI_EXPORT Font {
// Returns the number of horizontal pixels needed to display the specified
// string.
- int GetStringWidth(const string16& text) const;
+ int GetStringWidth(const base::string16& text) const;
// Returns the expected number of horizontal pixels needed to display the
// specified length of characters. Call GetStringWidth() to retrieve the
diff --git a/ui/gfx/font_fallback_win.cc b/ui/gfx/font_fallback_win.cc
index c6821722c7..c4e3f48a7e 100644
--- a/ui/gfx/font_fallback_win.cc
+++ b/ui/gfx/font_fallback_win.cc
@@ -9,7 +9,7 @@
#include "base/memory/singleton.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "ui/gfx/font.h"
@@ -48,7 +48,7 @@ void GetFontNamesFromFilename(const std::string& filename,
// Returns true if |text| contains only ASCII digits.
bool ContainsOnlyDigits(const std::string& text) {
- return text.find_first_not_of("0123456789") == string16::npos;
+ return text.find_first_not_of("0123456789") == base::string16::npos;
}
// Appends a Font with the given |name| and |size| to |fonts| unless the last
diff --git a/ui/gfx/font_unittest.cc b/ui/gfx/font_unittest.cc
index 8ca183ede1..8ab3d2bbab 100644
--- a/ui/gfx/font_unittest.cc
+++ b/ui/gfx/font_unittest.cc
@@ -5,7 +5,7 @@
#include "ui/gfx/font.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
@@ -103,9 +103,9 @@ TEST_F(FontTest, AvgCharWidth) {
TEST_F(FontTest, Widths) {
Font cf("Arial", 16);
- ASSERT_EQ(cf.GetStringWidth(string16()), 0);
+ ASSERT_EQ(cf.GetStringWidth(base::string16()), 0);
ASSERT_GT(cf.GetStringWidth(ASCIIToUTF16("a")),
- cf.GetStringWidth(string16()));
+ cf.GetStringWidth(base::string16()));
ASSERT_GT(cf.GetStringWidth(ASCIIToUTF16("ab")),
cf.GetStringWidth(ASCIIToUTF16("a")));
ASSERT_GT(cf.GetStringWidth(ASCIIToUTF16("abc")),
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc
index 8f1379de0a..1ae9874ad4 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -304,23 +304,23 @@ const ImageSkiaRep& ImageSkia::GetRepresentation(
}
void ImageSkia::SetReadOnly() {
- CHECK(storage_);
+ CHECK(storage_.get());
storage_->SetReadOnly();
DetachStorageFromThread();
}
void ImageSkia::MakeThreadSafe() {
- CHECK(storage_);
+ CHECK(storage_.get());
EnsureRepsForSupportedScaleFactors();
// Delete source as we no longer needs it.
- if (storage_)
+ if (storage_.get())
storage_->DeleteSource();
storage_->SetReadOnly();
CHECK(IsThreadSafe());
}
bool ImageSkia::IsThreadSafe() const {
- return !storage_ || (storage_->read_only() && !storage_->has_source());
+ return !storage_.get() || (storage_->read_only() && !storage_->has_source());
}
int ImageSkia::width() const {
@@ -358,7 +358,7 @@ void ImageSkia::EnsureRepsForSupportedScaleFactors() const {
// Don't check ReadOnly because the source may generate images
// even for read only ImageSkia. Concurrent access will be protected
// by |DCHECK(CalledOnValidThread())| in FindRepresentation.
- if (storage_ && storage_->has_source()) {
+ if (storage_.get() && storage_->has_source()) {
std::vector<ui::ScaleFactor> supported_scale_factors =
ui::GetSupportedScaleFactors();
for (size_t i = 0; i < supported_scale_factors.size(); ++i)
@@ -398,15 +398,15 @@ SkBitmap& ImageSkia::GetBitmap() const {
}
bool ImageSkia::CanRead() const {
- return !storage_ || storage_->CanRead();
+ return !storage_.get() || storage_->CanRead();
}
bool ImageSkia::CanModify() const {
- return !storage_ || storage_->CanModify();
+ return !storage_.get() || storage_->CanModify();
}
void ImageSkia::DetachStorageFromThread() {
- if (storage_)
+ if (storage_.get())
storage_->DetachFromThread();
}
diff --git a/ui/gfx/image/image_skia.h b/ui/gfx/image/image_skia.h
index 0aa2bf97f8..9d0e9afa88 100644
--- a/ui/gfx/image/image_skia.h
+++ b/ui/gfx/image/image_skia.h
@@ -114,7 +114,7 @@ class UI_EXPORT ImageSkia {
bool IsThreadSafe() const;
// Returns true if this is a null object.
- bool isNull() const { return storage_ == NULL; }
+ bool isNull() const { return storage_.get() == NULL; }
// Width and height of image in DIP coordinate system.
int width() const;
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc
index 2fff6b10d6..3f96d4b140 100644
--- a/ui/gfx/pango_util.cc
+++ b/ui/gfx/pango_util.cc
@@ -15,7 +15,7 @@
#include <vector>
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_render_params_linux.h"
@@ -144,7 +144,7 @@ double GetPangoResolution() {
}
void DrawTextOntoCairoSurface(cairo_t* cr,
- const string16& text,
+ const base::string16& text,
const gfx::Font& font,
const gfx::Rect& bounds,
const gfx::Rect& clip,
@@ -180,7 +180,7 @@ void DrawTextOntoCairoSurface(cairo_t* cr,
// Pass a width greater than 0 to force wrapping and eliding.
static void SetupPangoLayoutWithoutFont(
PangoLayout* layout,
- const string16& text,
+ const base::string16& text,
int width,
base::i18n::TextDirection text_direction,
int flags) {
@@ -266,7 +266,7 @@ static void SetupPangoLayoutWithoutFont(
// a single ampersand.
if (flags & Canvas::HIDE_PREFIX) {
DCHECK_EQ(1, g_unichar_to_utf8(kAcceleratorChar, NULL));
- string16 accelerator_removed =
+ base::string16 accelerator_removed =
RemoveAcceleratorChar(text, static_cast<char16>(kAcceleratorChar),
NULL, NULL);
utf8 = UTF16ToUTF8(accelerator_removed);
@@ -279,7 +279,7 @@ static void SetupPangoLayoutWithoutFont(
}
void SetupPangoLayout(PangoLayout* layout,
- const string16& text,
+ const base::string16& text,
const Font& font,
int width,
base::i18n::TextDirection text_direction,
@@ -292,7 +292,7 @@ void SetupPangoLayout(PangoLayout* layout,
void SetupPangoLayoutWithFontDescription(
PangoLayout* layout,
- const string16& text,
+ const base::string16& text,
const std::string& font_description,
int width,
base::i18n::TextDirection text_direction,
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h
index a6721354ec..48b0c530ab 100644
--- a/ui/gfx/pango_util.h
+++ b/ui/gfx/pango_util.h
@@ -52,7 +52,7 @@ class ScopedPangoFontDescription {
// Uses Pango to draw text onto |cr|. This is the public method for d
void UI_EXPORT DrawTextOntoCairoSurface(cairo_t* cr,
- const string16& text,
+ const base::string16& text,
const gfx::Font& font,
const gfx::Rect& bounds,
const gfx::Rect& clip,
@@ -68,7 +68,7 @@ void UI_EXPORT DrawTextOntoCairoSurface(cairo_t* cr,
// the |width| in PANGO_SCALE for RTL locale, the base |text_direction|,
// alignment, ellipsis, word wrapping, resolution, etc.
void SetupPangoLayout(PangoLayout* layout,
- const string16& text,
+ const base::string16& text,
const gfx::Font& font,
int width,
base::i18n::TextDirection text_direction,
@@ -78,7 +78,7 @@ void SetupPangoLayout(PangoLayout* layout,
// sets the font description based on |font_description|.
void SetupPangoLayoutWithFontDescription(
PangoLayout* layout,
- const string16& text,
+ const base::string16& text,
const std::string& font_description,
int width,
base::i18n::TextDirection text_direction,
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index a78eda6b55..9851a04ed0 100644
--- a/ui/gfx/platform_font.h
+++ b/ui/gfx/platform_font.h
@@ -47,7 +47,7 @@ class UI_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
// Returns the number of horizontal pixels needed to display the specified
// string.
- virtual int GetStringWidth(const string16& text) const = 0;
+ virtual int GetStringWidth(const base::string16& text) const = 0;
// Returns the expected number of horizontal pixels needed to display the
// specified length of characters. Call GetStringWidth() to retrieve the
diff --git a/ui/gfx/platform_font_ios.h b/ui/gfx/platform_font_ios.h
index 89477618c7..789b591415 100644
--- a/ui/gfx/platform_font_ios.h
+++ b/ui/gfx/platform_font_ios.h
@@ -21,7 +21,7 @@ class PlatformFontIOS : public PlatformFont {
virtual int GetHeight() const OVERRIDE;
virtual int GetBaseline() const OVERRIDE;
virtual int GetAverageCharacterWidth() const OVERRIDE;
- virtual int GetStringWidth(const string16& text) const OVERRIDE;
+ virtual int GetStringWidth(const base::string16& text) const OVERRIDE;
virtual int GetExpectedTextWidth(int length) const OVERRIDE;
virtual int GetStyle() const OVERRIDE;
virtual std::string GetFontName() const OVERRIDE;
diff --git a/ui/gfx/platform_font_ios.mm b/ui/gfx/platform_font_ios.mm
index 499c839371..cfc69cf496 100644
--- a/ui/gfx/platform_font_ios.mm
+++ b/ui/gfx/platform_font_ios.mm
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/font.h"
namespace gfx {
@@ -55,7 +55,7 @@ int PlatformFontIOS::GetAverageCharacterWidth() const {
return average_width_;
}
-int PlatformFontIOS::GetStringWidth(const string16& text) const {
+int PlatformFontIOS::GetStringWidth(const base::string16& text) const {
NSString* ns_text = base::SysUTF16ToNSString(text);
return [ns_text sizeWithFont:GetNativeFont()].width;
}
diff --git a/ui/gfx/platform_font_mac.h b/ui/gfx/platform_font_mac.h
index 42bbd9a96d..13c8677c22 100644
--- a/ui/gfx/platform_font_mac.h
+++ b/ui/gfx/platform_font_mac.h
@@ -22,7 +22,7 @@ class PlatformFontMac : public PlatformFont {
virtual int GetHeight() const OVERRIDE;
virtual int GetBaseline() const OVERRIDE;
virtual int GetAverageCharacterWidth() const OVERRIDE;
- virtual int GetStringWidth(const string16& text) const OVERRIDE;
+ virtual int GetStringWidth(const base::string16& text) const OVERRIDE;
virtual int GetExpectedTextWidth(int length) const OVERRIDE;
virtual int GetStyle() const OVERRIDE;
virtual std::string GetFontName() const OVERRIDE;
diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
index a558cbb44c..eff0c0f0c0 100644
--- a/ui/gfx/platform_font_mac.mm
+++ b/ui/gfx/platform_font_mac.mm
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -63,7 +63,7 @@ int PlatformFontMac::GetAverageCharacterWidth() const {
return average_width_;
}
-int PlatformFontMac::GetStringWidth(const string16& text) const {
+int PlatformFontMac::GetStringWidth(const base::string16& text) const {
return Canvas::GetStringWidth(text,
Font(const_cast<PlatformFontMac*>(this)));
}
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index 88181d02d5..b950d23aac 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -13,7 +13,7 @@
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/app_locale_settings.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkTypeface.h"
@@ -198,7 +198,7 @@ int PlatformFontPango::GetAverageCharacterWidth() const {
return SkScalarRound(average_width_pixels_);
}
-int PlatformFontPango::GetStringWidth(const string16& text) const {
+int PlatformFontPango::GetStringWidth(const base::string16& text) const {
return Canvas::GetStringWidth(text,
Font(const_cast<PlatformFontPango*>(this)));
}
diff --git a/ui/gfx/platform_font_pango.h b/ui/gfx/platform_font_pango.h
index 845c15028b..2fce305a1b 100644
--- a/ui/gfx/platform_font_pango.h
+++ b/ui/gfx/platform_font_pango.h
@@ -43,7 +43,7 @@ class UI_EXPORT PlatformFontPango : public PlatformFont {
virtual int GetHeight() const OVERRIDE;
virtual int GetBaseline() const OVERRIDE;
virtual int GetAverageCharacterWidth() const OVERRIDE;
- virtual int GetStringWidth(const string16& text) const OVERRIDE;
+ virtual int GetStringWidth(const base::string16& text) const OVERRIDE;
virtual int GetExpectedTextWidth(int length) const OVERRIDE;
virtual int GetStyle() const OVERRIDE;
virtual std::string GetFontName() const OVERRIDE;
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
index f8fec8dfa9..25e0b24ef4 100644
--- a/ui/gfx/platform_font_win.cc
+++ b/ui/gfx/platform_font_win.cc
@@ -13,7 +13,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_hdc.h"
#include "base/win/scoped_select_object.h"
#include "base/win/win_util.h"
@@ -145,7 +145,7 @@ int PlatformFontWin::GetAverageCharacterWidth() const {
return font_ref_->ave_char_width();
}
-int PlatformFontWin::GetStringWidth(const string16& text) const {
+int PlatformFontWin::GetStringWidth(const base::string16& text) const {
return Canvas::GetStringWidth(text,
Font(const_cast<PlatformFontWin*>(this)));
}
@@ -273,7 +273,7 @@ PlatformFontWin::HFontRef::HFontRef(HFONT hfont,
LOGFONT font_info;
GetObject(hfont_, sizeof(LOGFONT), &font_info);
- font_name_ = UTF16ToUTF8(string16(font_info.lfFaceName));
+ font_name_ = UTF16ToUTF8(base::string16(font_info.lfFaceName));
if (font_info.lfHeight < 0)
requested_font_size_ = -font_info.lfHeight;
}
diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h
index be8d77ba7d..568bf952b3 100644
--- a/ui/gfx/platform_font_win.h
+++ b/ui/gfx/platform_font_win.h
@@ -58,7 +58,7 @@ class UI_EXPORT PlatformFontWin : public PlatformFont {
virtual int GetHeight() const OVERRIDE;
virtual int GetBaseline() const OVERRIDE;
virtual int GetAverageCharacterWidth() const OVERRIDE;
- virtual int GetStringWidth(const string16& text) const OVERRIDE;
+ virtual int GetStringWidth(const base::string16& text) const OVERRIDE;
virtual int GetExpectedTextWidth(int length) const OVERRIDE;
virtual int GetStyle() const OVERRIDE;
virtual std::string GetFontName() const OVERRIDE;
diff --git a/ui/gfx/point_base.h b/ui/gfx/point_base.h
index 56a376bd65..048b0930b2 100644
--- a/ui/gfx/point_base.h
+++ b/ui/gfx/point_base.h
@@ -43,14 +43,14 @@ class UI_EXPORT PointBase {
y_ -= vector.y();
}
- void ClampToMax(const Class& max) {
- x_ = x_ <= max.x_ ? x_ : max.x_;
- y_ = y_ <= max.y_ ? y_ : max.y_;
+ void SetToMin(const Class& other) {
+ x_ = x_ <= other.x_ ? x_ : other.x_;
+ y_ = y_ <= other.y_ ? y_ : other.y_;
}
- void ClampToMin(const Class& min) {
- x_ = x_ >= min.x_ ? x_ : min.x_;
- y_ = y_ >= min.y_ ? y_ : min.y_;
+ void SetToMax(const Class& other) {
+ x_ = x_ >= other.x_ ? x_ : other.x_;
+ y_ = y_ >= other.y_ ? y_ : other.y_;
}
bool IsOrigin() const {
diff --git a/ui/gfx/point_unittest.cc b/ui/gfx/point_unittest.cc
index e35462f9a8..6cf73dd2ad 100644
--- a/ui/gfx/point_unittest.cc
+++ b/ui/gfx/point_unittest.cc
@@ -124,24 +124,24 @@ TEST(PointTest, ClampPoint) {
a = Point(3, 5);
EXPECT_EQ(Point(3, 5).ToString(), a.ToString());
- a.ClampToMin(Point(2, 4));
+ a.SetToMax(Point(2, 4));
EXPECT_EQ(Point(3, 5).ToString(), a.ToString());
- a.ClampToMin(Point(3, 5));
+ a.SetToMax(Point(3, 5));
EXPECT_EQ(Point(3, 5).ToString(), a.ToString());
- a.ClampToMin(Point(4, 2));
+ a.SetToMax(Point(4, 2));
EXPECT_EQ(Point(4, 5).ToString(), a.ToString());
- a.ClampToMin(Point(8, 10));
+ a.SetToMax(Point(8, 10));
EXPECT_EQ(Point(8, 10).ToString(), a.ToString());
- a.ClampToMax(Point(9, 11));
+ a.SetToMin(Point(9, 11));
EXPECT_EQ(Point(8, 10).ToString(), a.ToString());
- a.ClampToMax(Point(8, 10));
+ a.SetToMin(Point(8, 10));
EXPECT_EQ(Point(8, 10).ToString(), a.ToString());
- a.ClampToMax(Point(11, 9));
+ a.SetToMin(Point(11, 9));
EXPECT_EQ(Point(8, 9).ToString(), a.ToString());
- a.ClampToMax(Point(7, 11));
+ a.SetToMin(Point(7, 11));
EXPECT_EQ(Point(7, 9).ToString(), a.ToString());
- a.ClampToMax(Point(3, 5));
+ a.SetToMin(Point(3, 5));
EXPECT_EQ(Point(3, 5).ToString(), a.ToString());
}
@@ -150,24 +150,24 @@ TEST(PointTest, ClampPointF) {
a = PointF(3.5f, 5.5f);
EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(PointF(2.5f, 4.5f));
+ a.SetToMax(PointF(2.5f, 4.5f));
EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(PointF(3.5f, 5.5f));
+ a.SetToMax(PointF(3.5f, 5.5f));
EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(PointF(4.5f, 2.5f));
+ a.SetToMax(PointF(4.5f, 2.5f));
EXPECT_EQ(PointF(4.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(PointF(8.5f, 10.5f));
+ a.SetToMax(PointF(8.5f, 10.5f));
EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(PointF(9.5f, 11.5f));
+ a.SetToMin(PointF(9.5f, 11.5f));
EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(PointF(8.5f, 10.5f));
+ a.SetToMin(PointF(8.5f, 10.5f));
EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(PointF(11.5f, 9.5f));
+ a.SetToMin(PointF(11.5f, 9.5f));
EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(PointF(7.5f, 11.5f));
+ a.SetToMin(PointF(7.5f, 11.5f));
EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(PointF(3.5f, 5.5f));
+ a.SetToMin(PointF(3.5f, 5.5f));
EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
}
diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h
index 8ae2a64e55..f1a286323e 100644
--- a/ui/gfx/rect_base.h
+++ b/ui/gfx/rect_base.h
@@ -108,6 +108,7 @@ class UI_EXPORT RectBase {
bool Contains(const Class& rect) const;
// Returns true if this rectangle intersects the specified rectangle.
+ // An empty rectangle doesn't intersect any rectangle.
bool Intersects(const Class& rect) const;
// Computes the intersection of this rectangle with the given rectangle.
@@ -117,10 +118,8 @@ class UI_EXPORT RectBase {
// is the smallest rectangle containing both rectangles.
void Union(const Class& rect);
- // Computes the rectangle resulting from subtracting |rect| from |this|. If
- // |rect| does not intersect completely in either the x- or y-direction, then
- // |*this| does not change. If |rect| contains |this|, then an empty Rect is
- // the result.
+ // Computes the rectangle resulting from subtracting |rect| from |*this|,
+ // i.e. the bounding rect of |Region(*this) - Region(rect)|.
void Subtract(const Class& rect);
// Fits as much of the receiving rectangle into the supplied rectangle as
diff --git a/ui/gfx/rect_base_impl.h b/ui/gfx/rect_base_impl.h
index 4184c27c85..d0d3530562 100644
--- a/ui/gfx/rect_base_impl.h
+++ b/ui/gfx/rect_base_impl.h
@@ -149,7 +149,8 @@ template<typename Class,
typename Type>
bool RectBase<Class, PointClass, SizeClass, InsetsClass, VectorClass, Type>::
Intersects(const Class& rect) const {
- return !(rect.x() >= right() || rect.right() <= x() ||
+ return !(IsEmpty() || rect.IsEmpty() ||
+ rect.x() >= right() || rect.right() <= x() ||
rect.y() >= bottom() || rect.bottom() <= y());
}
@@ -224,14 +225,14 @@ void RectBase<Class, PointClass, SizeClass, InsetsClass, VectorClass, Type>::
// complete intersection in the y-direction
if (rect.x() <= x()) {
rx = rect.right();
- } else {
+ } else if (rect.right() >= right()) {
rr = rect.x();
}
} else if (rect.x() <= x() && rect.right() >= right()) {
// complete intersection in the x-direction
if (rect.y() <= y()) {
ry = rect.bottom();
- } else {
+ } else if (rect.bottom() >= bottom()) {
rb = rect.y();
}
}
diff --git a/ui/gfx/rect_unittest.cc b/ui/gfx/rect_unittest.cc
index 50ccdcf065..0b5f01eef3 100644
--- a/ui/gfx/rect_unittest.cc
+++ b/ui/gfx/rect_unittest.cc
@@ -53,6 +53,8 @@ TEST(RectTest, Intersects) {
bool intersects;
} tests[] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, false },
+ { 0, 0, 0, 0, -10, -10, 20, 20, false },
+ { -10, 0, 0, 20, 0, -10, 20, 0, false },
{ 0, 0, 10, 10, 0, 0, 10, 10, true },
{ 0, 0, 10, 10, 10, 10, 10, 10, false },
{ 10, 10, 10, 10, 0, 0, 10, 10, false },
@@ -65,6 +67,7 @@ TEST(RectTest, Intersects) {
Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
EXPECT_EQ(tests[i].intersects, r1.Intersects(r2));
+ EXPECT_EQ(tests[i].intersects, r2.Intersects(r1));
}
}
@@ -239,30 +242,47 @@ TEST(RectTest, Subtract) {
result.Subtract(Rect(15, 15, 20, 20));
EXPECT_EQ(Rect(10, 10, 20, 20).ToString(), result.ToString());
- // Complete intersection in the x-direction
+ // Complete intersection in the x-direction, top edge is fully covered.
result = Rect(10, 10, 20, 20);
result.Subtract(Rect(10, 15, 20, 20));
EXPECT_EQ(Rect(10, 10, 20, 5).ToString(), result.ToString());
- // Complete intersection in the x-direction
+ // Complete intersection in the x-direction, top edge is fully covered.
result = Rect(10, 10, 20, 20);
result.Subtract(Rect(5, 15, 30, 20));
EXPECT_EQ(Rect(10, 10, 20, 5).ToString(), result.ToString());
- // Complete intersection in the x-direction
+ // Complete intersection in the x-direction, bottom edge is fully covered.
result = Rect(10, 10, 20, 20);
result.Subtract(Rect(5, 5, 30, 20));
EXPECT_EQ(Rect(10, 25, 20, 5).ToString(), result.ToString());
- // Complete intersection in the y-direction
+ // Complete intersection in the x-direction, none of the edges is fully
+ // covered.
+ result = Rect(10, 10, 20, 20);
+ result.Subtract(Rect(5, 15, 30, 1));
+ EXPECT_EQ(Rect(10, 10, 20, 20).ToString(), result.ToString());
+
+ // Complete intersection in the y-direction, left edge is fully covered.
result = Rect(10, 10, 20, 20);
result.Subtract(Rect(10, 10, 10, 30));
EXPECT_EQ(Rect(20, 10, 10, 20).ToString(), result.ToString());
- // Complete intersection in the y-direction
+ // Complete intersection in the y-direction, left edge is fully covered.
result = Rect(10, 10, 20, 20);
result.Subtract(Rect(5, 5, 20, 30));
EXPECT_EQ(Rect(25, 10, 5, 20).ToString(), result.ToString());
+
+ // Complete intersection in the y-direction, right edge is fully covered.
+ result = Rect(10, 10, 20, 20);
+ result.Subtract(Rect(20, 5, 20, 30));
+ EXPECT_EQ(Rect(10, 10, 10, 20).ToString(), result.ToString());
+
+ // Complete intersection in the y-direction, none of the edges is fully
+ // covered.
+ result = Rect(10, 10, 20, 20);
+ result.Subtract(Rect(15, 5, 1, 30));
+ EXPECT_EQ(Rect(10, 10, 20, 20).ToString(), result.ToString());
}
TEST(RectTest, IsEmpty) {
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 5348f8ac7c..26c32ec95c 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -9,6 +9,7 @@
#include "base/i18n/break_iterator.h"
#include "base/logging.h"
#include "base/stl_util.h"
+#include "third_party/icu/public/common/unicode/utf16.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/text/utf16_indexing.h"
@@ -303,7 +304,7 @@ void StyleIterator::UpdatePosition(size_t position) {
RenderText::~RenderText() {
}
-void RenderText::SetText(const string16& text) {
+void RenderText::SetText(const base::string16& text) {
DCHECK(!composition_range_.IsValid());
text_ = text;
@@ -322,6 +323,7 @@ void RenderText::SetText(const string16& text) {
if (directionality_mode_ == DIRECTIONALITY_FROM_TEXT)
text_direction_ = base::i18n::UNKNOWN_DIRECTION;
+ obscured_reveal_index_ = -1;
UpdateObscuredText();
ResetLayout();
}
@@ -375,12 +377,23 @@ void RenderText::ToggleInsertMode() {
void RenderText::SetObscured(bool obscured) {
if (obscured != obscured_) {
obscured_ = obscured;
+ obscured_reveal_index_ = -1;
cached_bounds_and_offset_valid_ = false;
UpdateObscuredText();
ResetLayout();
}
}
+void RenderText::SetObscuredRevealIndex(int index) {
+ if (obscured_reveal_index_ == index)
+ return;
+
+ obscured_reveal_index_ = index;
+ cached_bounds_and_offset_valid_ = false;
+ UpdateObscuredText();
+ ResetLayout();
+}
+
void RenderText::SetDisplayRect(const Rect& r) {
display_rect_ = r;
cached_bounds_and_offset_valid_ = false;
@@ -744,6 +757,7 @@ RenderText::RenderText()
styles_(NUM_TEXT_STYLES),
composition_and_selection_styles_applied_(false),
obscured_(false),
+ obscured_reveal_index_(-1),
fade_head_(false),
fade_tail_(false),
background_is_transparent_(false),
@@ -783,7 +797,7 @@ void RenderText::SetSelectionModel(const SelectionModel& model) {
cached_bounds_and_offset_valid_ = false;
}
-const string16& RenderText::GetLayoutText() const {
+const base::string16& RenderText::GetLayoutText() const {
return obscured() ? obscured_text_ : text();
}
@@ -920,8 +934,22 @@ void RenderText::UpdateObscuredText() {
const size_t obscured_text_length =
static_cast<size_t>(ui::UTF16IndexToOffset(text_, 0, text_.length()));
- if (obscured_text_.length() != obscured_text_length)
- obscured_text_.resize(obscured_text_length, kPasswordReplacementChar);
+ obscured_text_.assign(obscured_text_length, kPasswordReplacementChar);
+
+ if (obscured_reveal_index_ >= 0 &&
+ obscured_reveal_index_ < static_cast<int>(text_.length())) {
+ // Gets the index range in |text_| to be revealed.
+ size_t start = obscured_reveal_index_;
+ U16_SET_CP_START(text_.data(), 0, start);
+ size_t end = start;
+ UChar32 unused_char;
+ U16_NEXT(text_.data(), end, text_.length(), unused_char);
+
+ // Gets the index in |obscured_text_| to be replaced.
+ const size_t cp_start =
+ static_cast<size_t>(ui::UTF16IndexToOffset(text_, 0, start));
+ obscured_text_.replace(cp_start, 1, text_.substr(start, end - start));
+ }
}
void RenderText::UpdateCachedBoundsAndOffset() {
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 41577c8ae9..aaffdcddc8 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -124,8 +124,8 @@ class UI_EXPORT RenderText {
// Creates a platform-specific RenderText instance.
static RenderText* CreateInstance();
- const string16& text() const { return text_; }
- void SetText(const string16& text);
+ const base::string16& text() const { return text_; }
+ void SetText(const base::string16& text);
HorizontalAlignment horizontal_alignment() const {
return horizontal_alignment_;
@@ -186,6 +186,13 @@ class UI_EXPORT RenderText {
bool obscured() const { return obscured_; }
void SetObscured(bool obscured);
+ // Makes a char in obscured text at |index| to be revealed. |index| should be
+ // a UTF16 text index. If there is a previous revealed index, the previous one
+ // is cleared and only the last set index will be revealed. If |index| is -1
+ // or out of range, no char will be revealed. The revealed index is also
+ // cleared when SetText or SetObscured is called.
+ void SetObscuredRevealIndex(int index);
+
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -402,7 +409,7 @@ class UI_EXPORT RenderText {
virtual void DrawVisualText(Canvas* canvas) = 0;
// Returns the text used for layout, which may be |obscured_text_|.
- const string16& GetLayoutText() const;
+ const base::string16& GetLayoutText() const;
// Apply (and undo) temporary composition underlines and selection colors.
void ApplyCompositionAndSelectionStyles();
@@ -439,6 +446,7 @@ class UI_EXPORT RenderText {
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetColorAndStyle);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyColorAndStyle);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText);
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset);
@@ -462,7 +470,7 @@ class UI_EXPORT RenderText {
void DrawSelection(Canvas* canvas);
// Logical UTF-16 string data to be drawn.
- string16 text_;
+ base::string16 text_;
// Horizontal alignment of the text with respect to |display_rect_|. The
// default is to align left if the application UI is LTR and right if RTL.
@@ -528,7 +536,10 @@ class UI_EXPORT RenderText {
// A flag and the text to display for obscured (password) fields.
// Asterisks are used instead of the actual text glyphs when true.
bool obscured_;
- string16 obscured_text_;
+ base::string16 obscured_text_;
+
+ // The index at which the char should be revealed in the obscured text.
+ int obscured_reveal_index_;
// Fade text head and/or tail, if text doesn't fit into |display_rect_|.
bool fade_head_;
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc
index 17f8ec47a1..8780614b9f 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -5,7 +5,7 @@
#include "ui/gfx/render_text.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/break_list.h"
@@ -193,7 +193,7 @@ TEST_F(RenderTextTest, PangoAttributes) {
PangoFontDescription* font = pango_font_description_new();
pango_attr_iterator_get_font(iter, font, NULL, NULL);
char* description_string = pango_font_description_to_string(font);
- const string16 desc = ASCIIToUTF16(description_string);
+ const base::string16 desc = ASCIIToUTF16(description_string);
const bool bold = desc.find(ASCIIToUTF16("Bold")) != std::string::npos;
EXPECT_EQ(cases[i].bold, bold);
const bool italic = desc.find(ASCIIToUTF16("Italic")) != std::string::npos;
@@ -211,7 +211,7 @@ TEST_F(RenderTextTest, PangoAttributes) {
// does not implement this yet. http://crbug.com/131618
#if !defined(OS_MACOSX)
void TestVisualCursorMotionInObscuredField(RenderText* render_text,
- const string16& text,
+ const base::string16& text,
bool select) {
ASSERT_TRUE(render_text->obscured());
render_text->SetText(text);
@@ -239,8 +239,8 @@ void TestVisualCursorMotionInObscuredField(RenderText* render_text,
}
TEST_F(RenderTextTest, ObscuredText) {
- const string16 seuss = ASCIIToUTF16("hop on pop");
- const string16 no_seuss = ASCIIToUTF16("**********");
+ const base::string16 seuss = ASCIIToUTF16("hop on pop");
+ const base::string16 no_seuss = ASCIIToUTF16("**********");
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
// GetLayoutText() returns asterisks when the obscured bit is set.
@@ -295,12 +295,84 @@ TEST_F(RenderTextTest, ObscuredText) {
L"\x05d0\x05d1 \x05d0\x05d2 \x05d1\x05d2", // Check RTL word boundaries.
};
for (size_t i = 0; i < arraysize(texts); ++i) {
- string16 text = WideToUTF16(texts[i]);
+ base::string16 text = WideToUTF16(texts[i]);
TestVisualCursorMotionInObscuredField(render_text.get(), text, false);
TestVisualCursorMotionInObscuredField(render_text.get(), text, true);
}
}
+TEST_F(RenderTextTest, RevealObscuredText) {
+ const base::string16 seuss = ASCIIToUTF16("hop on pop");
+ const base::string16 no_seuss = ASCIIToUTF16("**********");
+ scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
+
+ render_text->SetText(seuss);
+ render_text->SetObscured(true);
+ EXPECT_EQ(seuss, render_text->text());
+ EXPECT_EQ(no_seuss, render_text->GetLayoutText());
+
+ // Valid reveal index and new revealed index clears previous one.
+ render_text->RenderText::SetObscuredRevealIndex(0);
+ EXPECT_EQ(ASCIIToUTF16("h*********"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(1);
+ EXPECT_EQ(ASCIIToUTF16("*o********"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(2);
+ EXPECT_EQ(ASCIIToUTF16("**p*******"), render_text->GetLayoutText());
+
+ // Invalid reveal index.
+ render_text->RenderText::SetObscuredRevealIndex(-1);
+ EXPECT_EQ(no_seuss, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(seuss.length() + 1);
+ EXPECT_EQ(no_seuss, render_text->GetLayoutText());
+
+ // SetObscured clears the revealed index.
+ render_text->RenderText::SetObscuredRevealIndex(0);
+ EXPECT_EQ(ASCIIToUTF16("h*********"), render_text->GetLayoutText());
+ render_text->SetObscured(false);
+ EXPECT_EQ(seuss, render_text->GetLayoutText());
+ render_text->SetObscured(true);
+ EXPECT_EQ(no_seuss, render_text->GetLayoutText());
+
+ // SetText clears the revealed index.
+ render_text->SetText(ASCIIToUTF16("new"));
+ EXPECT_EQ(ASCIIToUTF16("***"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(2);
+ EXPECT_EQ(ASCIIToUTF16("**w"), render_text->GetLayoutText());
+ render_text->SetText(ASCIIToUTF16("new longer"));
+ EXPECT_EQ(ASCIIToUTF16("**********"), render_text->GetLayoutText());
+
+ // Text with invalid surrogates.
+ const char16 invalid_surrogates[] = {0xDC00, 0xD800, 'h', 'o', 'p', 0};
+ render_text->SetText(invalid_surrogates);
+ EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(0);
+ const char16 invalid_expect_0[] = {0xDC00, '*', '*', '*', '*', 0};
+ EXPECT_EQ(invalid_expect_0, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(1);
+ const char16 invalid_expect_1[] = {'*', 0xD800, '*', '*', '*', 0};
+ EXPECT_EQ(invalid_expect_1, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(2);
+ EXPECT_EQ(ASCIIToUTF16("**h**"), render_text->GetLayoutText());
+
+ // Text with valid surrogates before and after the reveal index.
+ const char16 valid_surrogates[] =
+ {0xD800, 0xDC00, 'h', 'o', 'p', 0xD800, 0xDC00, 0};
+ render_text->SetText(valid_surrogates);
+ EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(0);
+ const char16 valid_expect_0_and_1[] = {0xD800, 0xDC00, '*', '*', '*', '*', 0};
+ EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(1);
+ EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(2);
+ EXPECT_EQ(ASCIIToUTF16("*h***"), render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(5);
+ const char16 valid_expect_5_and_6[] = {'*', '*', '*', '*', 0xD800, 0xDC00, 0};
+ EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText());
+ render_text->RenderText::SetObscuredRevealIndex(6);
+ EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText());
+}
+
TEST_F(RenderTextTest, GetTextDirection) {
struct {
const wchar_t* text;
@@ -544,27 +616,28 @@ TEST_F(RenderTextTest, MoveCursorLeftRight_ComplexScript) {
TEST_F(RenderTextTest, GraphemePositions) {
// LTR 2-character grapheme, LTR abc, LTR 2-character grapheme.
- const string16 kText1 = WideToUTF16(L"\x0915\x093f"L"abc"L"\x0915\x093f");
+ const base::string16 kText1 =
+ WideToUTF16(L"\x0915\x093f"L"abc"L"\x0915\x093f");
// LTR ab, LTR 2-character grapheme, LTR cd.
- const string16 kText2 = WideToUTF16(L"ab"L"\x0915\x093f"L"cd");
+ const base::string16 kText2 = WideToUTF16(L"ab"L"\x0915\x093f"L"cd");
// The below is 'MUSICAL SYMBOL G CLEF', which is represented in UTF-16 as
// two characters forming the surrogate pair 0x0001D11E.
const std::string kSurrogate = "\xF0\x9D\x84\x9E";
// LTR ab, UTF16 surrogate pair, LTR cd.
- const string16 kText3 = UTF8ToUTF16("ab" + kSurrogate + "cd");
+ const base::string16 kText3 = UTF8ToUTF16("ab" + kSurrogate + "cd");
struct {
- string16 text;
+ base::string16 text;
size_t index;
size_t expected_previous;
size_t expected_next;
} cases[] = {
- { string16(), 0, 0, 0 },
- { string16(), 1, 0, 0 },
- { string16(), 50, 0, 0 },
+ { base::string16(), 0, 0, 0 },
+ { base::string16(), 1, 0, 0 },
+ { base::string16(), 50, 0, 0 },
{ kText1, 0, 0, 2 },
{ kText1, 1, 0, 2 },
{ kText1, 2, 0, 3 },
@@ -620,21 +693,23 @@ TEST_F(RenderTextTest, GraphemePositions) {
TEST_F(RenderTextTest, EdgeSelectionModels) {
// Simple Latin text.
- const string16 kLatin = WideToUTF16(L"abc");
+ const base::string16 kLatin = WideToUTF16(L"abc");
// LTR 2-character grapheme.
- const string16 kLTRGrapheme = WideToUTF16(L"\x0915\x093f");
+ const base::string16 kLTRGrapheme = WideToUTF16(L"\x0915\x093f");
// LTR 2-character grapheme, LTR a, LTR 2-character grapheme.
- const string16 kHindiLatin = WideToUTF16(L"\x0915\x093f"L"a"L"\x0915\x093f");
+ const base::string16 kHindiLatin =
+ WideToUTF16(L"\x0915\x093f"L"a"L"\x0915\x093f");
// RTL 2-character grapheme.
- const string16 kRTLGrapheme = WideToUTF16(L"\x05e0\x05b8");
+ const base::string16 kRTLGrapheme = WideToUTF16(L"\x05e0\x05b8");
// RTL 2-character grapheme, LTR a, RTL 2-character grapheme.
- const string16 kHebrewLatin = WideToUTF16(L"\x05e0\x05b8"L"a"L"\x05e0\x05b8");
+ const base::string16 kHebrewLatin =
+ WideToUTF16(L"\x05e0\x05b8"L"a"L"\x05e0\x05b8");
struct {
- string16 text;
+ base::string16 text;
base::i18n::TextDirection expected_text_direction;
} cases[] = {
- { string16(), base::i18n::LEFT_TO_RIGHT },
+ { base::string16(), base::i18n::LEFT_TO_RIGHT },
{ kLatin, base::i18n::LEFT_TO_RIGHT },
{ kLTRGrapheme, base::i18n::LEFT_TO_RIGHT },
{ kHindiLatin, base::i18n::LEFT_TO_RIGHT },
@@ -678,7 +753,7 @@ TEST_F(RenderTextTest, SelectAll) {
for (size_t i = 0; i < 2; ++i) {
SetRTL(!base::i18n::IsRTL());
// Test that an empty string produces an empty selection model.
- render_text->SetText(string16());
+ render_text->SetText(base::string16());
EXPECT_EQ(render_text->selection_model(), SelectionModel());
// Test the weak, LTR, RTL, and Bidi string cases.
@@ -913,7 +988,7 @@ TEST_F(RenderTextTest, StringSizeEmptyString) {
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
render_text->SetFont(font);
- render_text->SetText(string16());
+ render_text->SetText(base::string16());
EXPECT_EQ(font.GetHeight(), render_text->GetStringSize().height());
EXPECT_EQ(0, render_text->GetStringSize().width());
@@ -949,7 +1024,7 @@ TEST_F(RenderTextTest, StringSizeBoldWidth) {
}
TEST_F(RenderTextTest, StringSizeHeight) {
- string16 cases[] = {
+ base::string16 cases[] = {
WideToUTF16(L"Hello World!"), // English
WideToUTF16(L"\x6328\x62f6"), // Japanese
WideToUTF16(L"\x0915\x093f"), // Hindi
@@ -1077,7 +1152,7 @@ TEST_F(RenderTextTest, SameFontForParentheses) {
{ '<', '>' },
};
struct {
- string16 text;
+ base::string16 text;
} cases[] = {
// English(English)
{ WideToUTF16(L"Hello World(a)") },
@@ -1108,11 +1183,11 @@ TEST_F(RenderTextTest, SameFontForParentheses) {
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
- string16 text = cases[i].text;
+ base::string16 text = cases[i].text;
const size_t start_paren_char_index = text.find('(');
- ASSERT_NE(string16::npos, start_paren_char_index);
+ ASSERT_NE(base::string16::npos, start_paren_char_index);
const size_t end_paren_char_index = text.find(')');
- ASSERT_NE(string16::npos, end_paren_char_index);
+ ASSERT_NE(base::string16::npos, end_paren_char_index);
for (size_t j = 0; j < ARRAYSIZE_UNSAFE(punctuation_pairs); ++j) {
text[start_paren_char_index] = punctuation_pairs[j].left_char;
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index 4cf0833234..26870b18ba 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -10,7 +10,7 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index 59ad9230e4..d9e1f0a71c 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -8,17 +8,9 @@
#import <Cocoa/Cocoa.h>
#include "base/logging.h"
+#include "base/mac/sdk_forward_declarations.h"
#include "ui/gfx/display.h"
-#if !defined(MAC_OS_X_VERSION_10_7) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-@interface NSScreen (LionAPI)
-- (CGFloat)backingScaleFactor;
-@end
-
-#endif // 10.7
-
namespace {
gfx::Rect ConvertCoordinateSystem(NSRect ns_rect) {
diff --git a/ui/gfx/size_base.h b/ui/gfx/size_base.h
index 57e4700b8e..6f23fa3ced 100644
--- a/ui/gfx/size_base.h
+++ b/ui/gfx/size_base.h
@@ -35,14 +35,14 @@ class UI_EXPORT SizeBase {
height_ = height < 0 ? 0 : height;
}
- void ClampToMax(const Class& max) {
- width_ = width_ <= max.width_ ? width_ : max.width_;
- height_ = height_ <= max.height_ ? height_ : max.height_;
+ void SetToMin(const Class& other) {
+ width_ = width_ <= other.width_ ? width_ : other.width_;
+ height_ = height_ <= other.height_ ? height_ : other.height_;
}
- void ClampToMin(const Class& min) {
- width_ = width_ >= min.width_ ? width_ : min.width_;
- height_ = height_ >= min.height_ ? height_ : min.height_;
+ void SetToMax(const Class& other) {
+ width_ = width_ >= other.width_ ? width_ : other.width_;
+ height_ = height_ >= other.height_ ? height_ : other.height_;
}
bool IsEmpty() const {
diff --git a/ui/gfx/size_unittest.cc b/ui/gfx/size_unittest.cc
index e68bdd61d3..9f109b3f04 100644
--- a/ui/gfx/size_unittest.cc
+++ b/ui/gfx/size_unittest.cc
@@ -78,24 +78,24 @@ TEST(SizeTest, ClampSize) {
a = Size(3, 5);
EXPECT_EQ(Size(3, 5).ToString(), a.ToString());
- a.ClampToMin(Size(2, 4));
+ a.SetToMax(Size(2, 4));
EXPECT_EQ(Size(3, 5).ToString(), a.ToString());
- a.ClampToMin(Size(3, 5));
+ a.SetToMax(Size(3, 5));
EXPECT_EQ(Size(3, 5).ToString(), a.ToString());
- a.ClampToMin(Size(4, 2));
+ a.SetToMax(Size(4, 2));
EXPECT_EQ(Size(4, 5).ToString(), a.ToString());
- a.ClampToMin(Size(8, 10));
+ a.SetToMax(Size(8, 10));
EXPECT_EQ(Size(8, 10).ToString(), a.ToString());
- a.ClampToMax(Size(9, 11));
+ a.SetToMin(Size(9, 11));
EXPECT_EQ(Size(8, 10).ToString(), a.ToString());
- a.ClampToMax(Size(8, 10));
+ a.SetToMin(Size(8, 10));
EXPECT_EQ(Size(8, 10).ToString(), a.ToString());
- a.ClampToMax(Size(11, 9));
+ a.SetToMin(Size(11, 9));
EXPECT_EQ(Size(8, 9).ToString(), a.ToString());
- a.ClampToMax(Size(7, 11));
+ a.SetToMin(Size(7, 11));
EXPECT_EQ(Size(7, 9).ToString(), a.ToString());
- a.ClampToMax(Size(3, 5));
+ a.SetToMin(Size(3, 5));
EXPECT_EQ(Size(3, 5).ToString(), a.ToString());
}
@@ -104,24 +104,24 @@ TEST(SizeTest, ClampSizeF) {
a = SizeF(3.5f, 5.5f);
EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(SizeF(2.5f, 4.5f));
+ a.SetToMax(SizeF(2.5f, 4.5f));
EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(SizeF(3.5f, 5.5f));
+ a.SetToMax(SizeF(3.5f, 5.5f));
EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(SizeF(4.5f, 2.5f));
+ a.SetToMax(SizeF(4.5f, 2.5f));
EXPECT_EQ(SizeF(4.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(SizeF(8.5f, 10.5f));
+ a.SetToMax(SizeF(8.5f, 10.5f));
EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(SizeF(9.5f, 11.5f));
+ a.SetToMin(SizeF(9.5f, 11.5f));
EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(SizeF(8.5f, 10.5f));
+ a.SetToMin(SizeF(8.5f, 10.5f));
EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(SizeF(11.5f, 9.5f));
+ a.SetToMin(SizeF(11.5f, 9.5f));
EXPECT_EQ(SizeF(8.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(SizeF(7.5f, 11.5f));
+ a.SetToMin(SizeF(7.5f, 11.5f));
EXPECT_EQ(SizeF(7.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(SizeF(3.5f, 5.5f));
+ a.SetToMin(SizeF(3.5f, 5.5f));
EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString());
}
diff --git a/ui/gfx/text_utils.cc b/ui/gfx/text_utils.cc
index 8a2658c8be..a31ef3d3cc 100644
--- a/ui/gfx/text_utils.cc
+++ b/ui/gfx/text_utils.cc
@@ -8,15 +8,15 @@
namespace gfx {
-string16 RemoveAcceleratorChar(const string16& s,
- char16 accelerator_char,
- int* accelerated_char_pos,
- int* accelerated_char_span) {
+base::string16 RemoveAcceleratorChar(const base::string16& s,
+ base::char16 accelerator_char,
+ int* accelerated_char_pos,
+ int* accelerated_char_span) {
bool escaped = false;
ptrdiff_t last_char_pos = -1;
int last_char_span = 0;
base::i18n::UTF16CharIterator chars(&s);
- string16 accelerator_removed;
+ base::string16 accelerator_removed;
accelerator_removed.reserve(s.size());
while (!chars.end()) {
diff --git a/ui/gfx/text_utils.h b/ui/gfx/text_utils.h
index 274664f4e2..12035ea1eb 100644
--- a/ui/gfx/text_utils.h
+++ b/ui/gfx/text_utils.h
@@ -15,10 +15,10 @@ namespace gfx {
// |accelerated_char_pos| and |accelerated_char_span| will be set to the index
// and span of the last accelerated character, respectively, or -1 and 0 if
// there was none.
-UI_EXPORT string16 RemoveAcceleratorChar(const string16& s,
- char16 accelerator_char,
- int* accelerated_char_pos,
- int* accelerated_char_span);
+UI_EXPORT base::string16 RemoveAcceleratorChar(const base::string16& s,
+ base::char16 accelerator_char,
+ int* accelerated_char_pos,
+ int* accelerated_char_span);
} // namespace gfx
diff --git a/ui/gfx/text_utils_unittest.cc b/ui/gfx/text_utils_unittest.cc
index 0b4aaadd32..1090b388b0 100644
--- a/ui/gfx/text_utils_unittest.cc
+++ b/ui/gfx/text_utils_unittest.cc
@@ -4,7 +4,7 @@
#include "ui/gfx/text_utils.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gfx {
@@ -48,10 +48,10 @@ TEST(TextUtilsTest, RemoveAcceleratorChar) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
int accelerated_char_pos;
int accelerated_char_span;
- string16 result = RemoveAcceleratorChar(UTF8ToUTF16(cases[i].input),
- kAcceleratorChar,
- &accelerated_char_pos,
- &accelerated_char_span);
+ base::string16 result = RemoveAcceleratorChar(UTF8ToUTF16(cases[i].input),
+ kAcceleratorChar,
+ &accelerated_char_pos,
+ &accelerated_char_span);
EXPECT_EQ(result, UTF8ToUTF16(cases[i].output));
EXPECT_EQ(accelerated_char_pos, cases[i].accelerated_char_pos);
EXPECT_EQ(accelerated_char_span, cases[i].accelerated_char_span);
diff --git a/ui/gfx/transform.cc b/ui/gfx/transform.cc
index 5e8799841f..09a213ebbf 100644
--- a/ui/gfx/transform.cc
+++ b/ui/gfx/transform.cc
@@ -365,14 +365,6 @@ bool Transform::TransformRectReverse(RectF* rect) const {
}
bool Transform::Blend(const Transform& from, double progress) {
- if (progress <= 0.0) {
- *this = from;
- return true;
- }
-
- if (progress >= 1.0)
- return true;
-
DecomposedTransform to_decomp;
DecomposedTransform from_decomp;
if (!DecomposeTransform(&to_decomp, *this) ||
diff --git a/ui/gfx/transform_unittest.cc b/ui/gfx/transform_unittest.cc
index 72abeef9b8..7ccde8c6df 100644
--- a/ui/gfx/transform_unittest.cc
+++ b/ui/gfx/transform_unittest.cc
@@ -12,6 +12,7 @@
#include <limits>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/point.h"
#include "ui/gfx/point3_f.h"
@@ -654,7 +655,7 @@ TEST(XFormTest, SetRotate2D) {
TEST(XFormTest, BlendTranslate) {
Transform from;
- for (int i = 0; i < 10; ++i) {
+ for (int i = -5; i < 15; ++i) {
Transform to;
to.Translate3d(1, 1, 1);
double t = i / 9.0;
@@ -674,7 +675,7 @@ TEST(XFormTest, BlendRotate) {
};
Transform from;
for (size_t index = 0; index < ARRAYSIZE_UNSAFE(axes); ++index) {
- for (int i = 0; i < 10; ++i) {
+ for (int i = -5; i < 15; ++i) {
Transform to;
to.RotateAbout(axes[index], 90);
double t = i / 9.0;
@@ -698,7 +699,7 @@ TEST(XFormTest, BlendRotateFollowsShortestPath) {
Vector3dF(1, 1, 1)
};
for (size_t index = 0; index < ARRAYSIZE_UNSAFE(axes); ++index) {
- for (int i = 0; i < 10; ++i) {
+ for (int i = -5; i < 15; ++i) {
Transform from1;
from1.RotateAbout(axes[index], 130.0);
Transform to1;
@@ -734,7 +735,7 @@ TEST(XFormTest, CanBlend180DegreeRotation) {
};
Transform from;
for (size_t index = 0; index < ARRAYSIZE_UNSAFE(axes); ++index) {
- for (int i = 0; i < 10; ++i) {
+ for (int i = -5; i < 15; ++i) {
Transform to;
to.RotateAbout(axes[index], 180);
double t = i / 9.0;
@@ -750,7 +751,7 @@ TEST(XFormTest, CanBlend180DegreeRotation) {
TEST(XFormTest, BlendScale) {
Transform from;
- for (int i = 0; i < 10; ++i) {
+ for (int i = -5; i < 15; ++i) {
Transform to;
to.Scale3d(5, 4, 3);
double t = i / 9.0;
@@ -776,15 +777,29 @@ TEST(XFormTest, BlendSkew) {
}
}
+TEST(XFormTest, ExtrapolateSkew) {
+ Transform from;
+ for (int i = -1; i < 2; ++i) {
+ Transform to;
+ to.SkewX(20);
+ double t = i;
+ Transform expected;
+ expected.SkewX(t * 20);
+ EXPECT_TRUE(to.Blend(from, t));
+ EXPECT_TRUE(MatricesAreNearlyEqual(expected, to));
+ }
+}
+
TEST(XFormTest, BlendPerspective) {
Transform from;
from.ApplyPerspectiveDepth(200);
- for (int i = 0; i < 2; ++i) {
+ for (int i = -1; i < 3; ++i) {
Transform to;
to.ApplyPerspectiveDepth(800);
double t = i;
+ double depth = 1.0 / ((1.0 / 200) * (1.0 - t) + (1.0 / 800) * t);
Transform expected;
- expected.ApplyPerspectiveDepth(t * 600 + 200);
+ expected.ApplyPerspectiveDepth(depth);
EXPECT_TRUE(to.Blend(from, t));
EXPECT_TRUE(MatricesAreNearlyEqual(expected, to));
}
diff --git a/ui/gfx/vector2d.h b/ui/gfx/vector2d.h
index e22a7512c3..69f6b400ce 100644
--- a/ui/gfx/vector2d.h
+++ b/ui/gfx/vector2d.h
@@ -40,14 +40,14 @@ class UI_EXPORT Vector2d {
void operator+=(const Vector2d& other) { Add(other); }
void operator-=(const Vector2d& other) { Subtract(other); }
- void ClampToMax(const Vector2d& max) {
- x_ = x_ <= max.x_ ? x_ : max.x_;
- y_ = y_ <= max.y_ ? y_ : max.y_;
+ void SetToMin(const Vector2d& other) {
+ x_ = x_ <= other.x_ ? x_ : other.x_;
+ y_ = y_ <= other.y_ ? y_ : other.y_;
}
- void ClampToMin(const Vector2d& min) {
- x_ = x_ >= min.x_ ? x_ : min.x_;
- y_ = y_ >= min.y_ ? y_ : min.y_;
+ void SetToMax(const Vector2d& other) {
+ x_ = x_ >= other.x_ ? x_ : other.x_;
+ y_ = y_ >= other.y_ ? y_ : other.y_;
}
// Gives the square of the diagonal length of the vector. Since this is
diff --git a/ui/gfx/vector2d_f.h b/ui/gfx/vector2d_f.h
index 72e1b00b86..fdd3a9e308 100644
--- a/ui/gfx/vector2d_f.h
+++ b/ui/gfx/vector2d_f.h
@@ -38,14 +38,14 @@ class UI_EXPORT Vector2dF {
void operator+=(const Vector2dF& other) { Add(other); }
void operator-=(const Vector2dF& other) { Subtract(other); }
- void ClampToMax(const Vector2dF& max) {
- x_ = x_ <= max.x_ ? x_ : max.x_;
- y_ = y_ <= max.y_ ? y_ : max.y_;
+ void SetToMin(const Vector2dF& other) {
+ x_ = x_ <= other.x_ ? x_ : other.x_;
+ y_ = y_ <= other.y_ ? y_ : other.y_;
}
- void ClampToMin(const Vector2dF& min) {
- x_ = x_ >= min.x_ ? x_ : min.x_;
- y_ = y_ >= min.y_ ? y_ : min.y_;
+ void SetToMax(const Vector2dF& other) {
+ x_ = x_ >= other.x_ ? x_ : other.x_;
+ y_ = y_ >= other.y_ ? y_ : other.y_;
}
// Gives the square of the diagonal length of the vector.
diff --git a/ui/gfx/vector2d_unittest.cc b/ui/gfx/vector2d_unittest.cc
index cb1764cde4..5d9e21ea66 100644
--- a/ui/gfx/vector2d_unittest.cc
+++ b/ui/gfx/vector2d_unittest.cc
@@ -200,24 +200,24 @@ TEST(Vector2dTest, ClampVector2d) {
a = Vector2d(3, 5);
EXPECT_EQ(Vector2d(3, 5).ToString(), a.ToString());
- a.ClampToMin(Vector2d(2, 4));
+ a.SetToMax(Vector2d(2, 4));
EXPECT_EQ(Vector2d(3, 5).ToString(), a.ToString());
- a.ClampToMin(Vector2d(3, 5));
+ a.SetToMax(Vector2d(3, 5));
EXPECT_EQ(Vector2d(3, 5).ToString(), a.ToString());
- a.ClampToMin(Vector2d(4, 2));
+ a.SetToMax(Vector2d(4, 2));
EXPECT_EQ(Vector2d(4, 5).ToString(), a.ToString());
- a.ClampToMin(Vector2d(8, 10));
+ a.SetToMax(Vector2d(8, 10));
EXPECT_EQ(Vector2d(8, 10).ToString(), a.ToString());
- a.ClampToMax(Vector2d(9, 11));
+ a.SetToMin(Vector2d(9, 11));
EXPECT_EQ(Vector2d(8, 10).ToString(), a.ToString());
- a.ClampToMax(Vector2d(8, 10));
+ a.SetToMin(Vector2d(8, 10));
EXPECT_EQ(Vector2d(8, 10).ToString(), a.ToString());
- a.ClampToMax(Vector2d(11, 9));
+ a.SetToMin(Vector2d(11, 9));
EXPECT_EQ(Vector2d(8, 9).ToString(), a.ToString());
- a.ClampToMax(Vector2d(7, 11));
+ a.SetToMin(Vector2d(7, 11));
EXPECT_EQ(Vector2d(7, 9).ToString(), a.ToString());
- a.ClampToMax(Vector2d(3, 5));
+ a.SetToMin(Vector2d(3, 5));
EXPECT_EQ(Vector2d(3, 5).ToString(), a.ToString());
}
@@ -226,24 +226,24 @@ TEST(Vector2dTest, ClampVector2dF) {
a = Vector2dF(3.5f, 5.5f);
EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(Vector2dF(2.5f, 4.5f));
+ a.SetToMax(Vector2dF(2.5f, 4.5f));
EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(Vector2dF(3.5f, 5.5f));
+ a.SetToMax(Vector2dF(3.5f, 5.5f));
EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(Vector2dF(4.5f, 2.5f));
+ a.SetToMax(Vector2dF(4.5f, 2.5f));
EXPECT_EQ(Vector2dF(4.5f, 5.5f).ToString(), a.ToString());
- a.ClampToMin(Vector2dF(8.5f, 10.5f));
+ a.SetToMax(Vector2dF(8.5f, 10.5f));
EXPECT_EQ(Vector2dF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(Vector2dF(9.5f, 11.5f));
+ a.SetToMin(Vector2dF(9.5f, 11.5f));
EXPECT_EQ(Vector2dF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(Vector2dF(8.5f, 10.5f));
+ a.SetToMin(Vector2dF(8.5f, 10.5f));
EXPECT_EQ(Vector2dF(8.5f, 10.5f).ToString(), a.ToString());
- a.ClampToMax(Vector2dF(11.5f, 9.5f));
+ a.SetToMin(Vector2dF(11.5f, 9.5f));
EXPECT_EQ(Vector2dF(8.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(Vector2dF(7.5f, 11.5f));
+ a.SetToMin(Vector2dF(7.5f, 11.5f));
EXPECT_EQ(Vector2dF(7.5f, 9.5f).ToString(), a.ToString());
- a.ClampToMax(Vector2dF(3.5f, 5.5f));
+ a.SetToMin(Vector2dF(3.5f, 5.5f));
EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString());
}
diff --git a/ui/gfx/vector3d_f.h b/ui/gfx/vector3d_f.h
index bb93abdeaf..17ad332f3a 100644
--- a/ui/gfx/vector3d_f.h
+++ b/ui/gfx/vector3d_f.h
@@ -44,16 +44,16 @@ class UI_EXPORT Vector3dF {
void operator+=(const Vector3dF& other) { Add(other); }
void operator-=(const Vector3dF& other) { Subtract(other); }
- void ClampToMax(const Vector3dF& max) {
- x_ = x_ <= max.x_ ? x_ : max.x_;
- y_ = y_ <= max.y_ ? y_ : max.y_;
- z_ = z_ <= max.z_ ? z_ : max.z_;
+ void SetToMin(const Vector3dF& other) {
+ x_ = x_ <= other.x_ ? x_ : other.x_;
+ y_ = y_ <= other.y_ ? y_ : other.y_;
+ z_ = z_ <= other.z_ ? z_ : other.z_;
}
- void ClampToMin(const Vector3dF& min) {
- x_ = x_ >= min.x_ ? x_ : min.x_;
- y_ = y_ >= min.y_ ? y_ : min.y_;
- z_ = z_ >= min.z_ ? z_ : min.z_;
+ void SetToMax(const Vector3dF& other) {
+ x_ = x_ >= other.x_ ? x_ : other.x_;
+ y_ = y_ >= other.y_ ? y_ : other.y_;
+ z_ = z_ >= other.z_ ? z_ : other.z_;
}
// Gives the square of the diagonal length of the vector.
diff --git a/ui/gfx/vector3d_unittest.cc b/ui/gfx/vector3d_unittest.cc
index 9a479a289a..5b3bd7e91b 100644
--- a/ui/gfx/vector3d_unittest.cc
+++ b/ui/gfx/vector3d_unittest.cc
@@ -234,30 +234,30 @@ TEST(Vector3dFTest, ClampVector3dF) {
a = Vector3dF(3.5f, 5.5f, 7.5f);
EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(2, 4.5f, 6.5f));
+ a.SetToMax(Vector3dF(2, 4.5f, 6.5f));
EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(3.5f, 5.5f, 7.5f));
+ a.SetToMax(Vector3dF(3.5f, 5.5f, 7.5f));
EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(4.5f, 2, 6.5f));
+ a.SetToMax(Vector3dF(4.5f, 2, 6.5f));
EXPECT_EQ(Vector3dF(4.5f, 5.5f, 7.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(3.5f, 6.5f, 6.5f));
+ a.SetToMax(Vector3dF(3.5f, 6.5f, 6.5f));
EXPECT_EQ(Vector3dF(4.5f, 6.5f, 7.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(3.5f, 5.5f, 8.5f));
+ a.SetToMax(Vector3dF(3.5f, 5.5f, 8.5f));
EXPECT_EQ(Vector3dF(4.5f, 6.5f, 8.5f).ToString(), a.ToString());
- a.ClampToMin(Vector3dF(8.5f, 10.5f, 12.5f));
+ a.SetToMax(Vector3dF(8.5f, 10.5f, 12.5f));
EXPECT_EQ(Vector3dF(8.5f, 10.5f, 12.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(9.5f, 11.5f, 13.5f));
+ a.SetToMin(Vector3dF(9.5f, 11.5f, 13.5f));
EXPECT_EQ(Vector3dF(8.5f, 10.5f, 12.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(8.5f, 10.5f, 12.5f));
+ a.SetToMin(Vector3dF(8.5f, 10.5f, 12.5f));
EXPECT_EQ(Vector3dF(8.5f, 10.5f, 12.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(7.5f, 11.5f, 13.5f));
+ a.SetToMin(Vector3dF(7.5f, 11.5f, 13.5f));
EXPECT_EQ(Vector3dF(7.5f, 10.5f, 12.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(9.5f, 9.5f, 13.5f));
+ a.SetToMin(Vector3dF(9.5f, 9.5f, 13.5f));
EXPECT_EQ(Vector3dF(7.5f, 9.5f, 12.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(9.5f, 11.5f, 11.5f));
+ a.SetToMin(Vector3dF(9.5f, 11.5f, 11.5f));
EXPECT_EQ(Vector3dF(7.5f, 9.5f, 11.5f).ToString(), a.ToString());
- a.ClampToMax(Vector3dF(3.5f, 5.5f, 7.5f));
+ a.SetToMin(Vector3dF(3.5f, 5.5f, 7.5f));
EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString());
}
diff --git a/ui/gl/DEPS b/ui/gl/DEPS
index f81f0786c7..02955623ff 100644
--- a/ui/gl/DEPS
+++ b/ui/gl/DEPS
@@ -1,4 +1,4 @@
include_rules = [
"+third_party/khronos",
- "+third_party/mesa/MesaLib/include",
+ "+third_party/mesa/src/include",
]
diff --git a/ui/gl/android/scoped_java_surface.cc b/ui/gl/android/scoped_java_surface.cc
index d70f54d239..24588f35f7 100644
--- a/ui/gl/android/scoped_java_surface.cc
+++ b/ui/gl/android/scoped_java_surface.cc
@@ -27,7 +27,8 @@ ScopedJavaSurface::ScopedJavaSurface() {
}
ScopedJavaSurface::ScopedJavaSurface(
- const base::android::JavaRef<jobject>& surface) {
+ const base::android::JavaRef<jobject>& surface)
+ : auto_release_(true) {
JNIEnv* env = base::android::AttachCurrentThread();
RegisterNativesIfNeeded(env);
DCHECK(env->IsInstanceOf(surface.obj(), g_Surface_clazz));
@@ -44,11 +45,44 @@ ScopedJavaSurface::ScopedJavaSurface(
j_surface_.Reset(tmp);
}
+ScopedJavaSurface::ScopedJavaSurface(RValue rvalue) {
+ MoveFrom(*rvalue.object);
+}
+
+ScopedJavaSurface& ScopedJavaSurface::operator=(RValue rhs) {
+ MoveFrom(*rhs.object);
+ return *this;
+}
+
ScopedJavaSurface::~ScopedJavaSurface() {
- if (!j_surface_.is_null()) {
+ if (auto_release_ && !j_surface_.is_null()) {
JNIEnv* env = base::android::AttachCurrentThread();
JNI_Surface::Java_Surface_release(env, j_surface_.obj());
}
}
+void ScopedJavaSurface::SetAutoRelease(bool auto_release) {
+ auto_release_ = auto_release;
+}
+
+void ScopedJavaSurface::MoveFrom(ScopedJavaSurface& other) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ j_surface_.Reset(env, other.j_surface_.Release());
+ auto_release_ = other.auto_release_;
+}
+
+bool ScopedJavaSurface::IsSurfaceEmpty() {
+ return j_surface_.is_null();
+}
+
+// static
+ScopedJavaSurface ScopedJavaSurface::AcquireExternalSurface(jobject surface) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> surface_ref;
+ surface_ref.Reset(env, surface);
+ gfx::ScopedJavaSurface scoped_surface(surface_ref);
+ scoped_surface.SetAutoRelease(false);
+ return scoped_surface;
+}
+
} // namespace gfx
diff --git a/ui/gl/android/scoped_java_surface.h b/ui/gl/android/scoped_java_surface.h
index 7795ef29de..8a7726d91f 100644
--- a/ui/gl/android/scoped_java_surface.h
+++ b/ui/gl/android/scoped_java_surface.h
@@ -8,6 +8,7 @@
#include <jni.h>
#include "base/android/scoped_java_ref.h"
+#include "base/move.h"
#include "ui/gl/gl_export.h"
namespace gfx {
@@ -18,6 +19,8 @@ class SurfaceTextureBridge;
// When going out of scope, Surface.release() is called on the Java object to
// make sure server-side references (esp. wrt graphics memory) are released.
class GL_EXPORT ScopedJavaSurface {
+ MOVE_ONLY_TYPE_FOR_CPP_03(ScopedJavaSurface, RValue);
+
public:
ScopedJavaSurface();
@@ -28,13 +31,35 @@ class GL_EXPORT ScopedJavaSurface {
// ScopedJavaSurface.
explicit ScopedJavaSurface(const SurfaceTextureBridge* surface_texture);
+ // Move constructor. Take the surface from another ScopedJavaSurface object,
+ // the latter no longer owns the surface afterwards.
+ ScopedJavaSurface(RValue rvalue);
+ ScopedJavaSurface& operator=(RValue rhs);
+
+ // Creates a ScopedJavaSurface that is owned externally, i.e.,
+ // someone else is responsible to call Surface.release().
+ static ScopedJavaSurface AcquireExternalSurface(jobject surface);
+
~ScopedJavaSurface();
+ // Check whether the surface is an empty one.
+ bool IsSurfaceEmpty();
+
const base::android::JavaRef<jobject>& j_surface() const {
return j_surface_;
}
private:
+ // Performs destructive move from |other| to this.
+ void MoveFrom(ScopedJavaSurface& other);
+
+ // Sets whether the reference to the underlying resource (see
+ // Surface.release()) will released during the destruction of this object.
+ // |True| by default.
+ void SetAutoRelease(bool auto_release);
+
+ bool auto_release_;
+
base::android::ScopedJavaGlobalRef<jobject> j_surface_;
};
diff --git a/ui/gl/android/surface_texture_listener.cc b/ui/gl/android/surface_texture_listener.cc
index ad908de31a..0547720202 100644
--- a/ui/gl/android/surface_texture_listener.cc
+++ b/ui/gl/android/surface_texture_listener.cc
@@ -6,7 +6,7 @@
#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop_proxy.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "jni/SurfaceTextureListener_jni.h"
#include "ui/gl/android/surface_texture_bridge.h"
diff --git a/ui/gl/gl.gyp b/ui/gl/gl.gyp
index c8625d99d9..115b373518 100644
--- a/ui/gl/gl.gyp
+++ b/ui/gl/gl.gyp
@@ -28,7 +28,7 @@
],
'include_dirs': [
'<(DEPTH)/third_party/swiftshader/include',
- '<(DEPTH)/third_party/mesa/MesaLib/include',
+ '<(DEPTH)/third_party/mesa/src/include',
'<(gl_binding_output_dir)',
],
'direct_dependent_settings': {
@@ -129,7 +129,7 @@
'generator_path': 'generate_bindings.py',
'conditions': [
['use_system_mesa==0', {
- 'header_paths': '../../third_party/mesa/MesaLib/include:../../third_party/khronos',
+ 'header_paths': '../../third_party/mesa/src/include:../../third_party/khronos',
}, { # use_system_mesa==1
'header_paths': '/usr/include',
}],
diff --git a/ui/gl/gl.target.darwin-arm.mk b/ui/gl/gl.target.darwin-arm.mk
index 1bac6f26d6..e410724f1c 100644
--- a/ui/gl/gl.target.darwin-arm.mk
+++ b/ui/gl/gl.target.darwin-arm.mk
@@ -21,9 +21,9 @@ $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_local_path
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/src/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: ui_gl_gl_gyp_gl_target_generate_gl_bindings ($@)"
- $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/MesaLib/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
+ $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/src/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_api_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
@@ -177,7 +177,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -212,7 +211,7 @@ LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/swiftshader/include \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(gyp_shared_intermediate_dir)/ui/gl \
$(LOCAL_PATH)/third_party/khronos \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
diff --git a/ui/gl/gl.target.darwin-x86.mk b/ui/gl/gl.target.darwin-x86.mk
index 13cdcd8a32..f0dbea0419 100644
--- a/ui/gl/gl.target.darwin-x86.mk
+++ b/ui/gl/gl.target.darwin-x86.mk
@@ -21,9 +21,9 @@ $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_local_path
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/src/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: ui_gl_gl_gyp_gl_target_generate_gl_bindings ($@)"
- $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/MesaLib/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
+ $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/src/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_api_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
@@ -179,7 +179,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -213,7 +212,7 @@ LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/swiftshader/include \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(gyp_shared_intermediate_dir)/ui/gl \
$(LOCAL_PATH)/third_party/khronos \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
diff --git a/ui/gl/gl.target.linux-arm.mk b/ui/gl/gl.target.linux-arm.mk
index 1bac6f26d6..e410724f1c 100644
--- a/ui/gl/gl.target.linux-arm.mk
+++ b/ui/gl/gl.target.linux-arm.mk
@@ -21,9 +21,9 @@ $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_local_path
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/src/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: ui_gl_gl_gyp_gl_target_generate_gl_bindings ($@)"
- $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/MesaLib/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
+ $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/src/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_api_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
@@ -177,7 +177,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -212,7 +211,7 @@ LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/swiftshader/include \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(gyp_shared_intermediate_dir)/ui/gl \
$(LOCAL_PATH)/third_party/khronos \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
diff --git a/ui/gl/gl.target.linux-x86.mk b/ui/gl/gl.target.linux-x86.mk
index 13cdcd8a32..f0dbea0419 100644
--- a/ui/gl/gl.target.linux-x86.mk
+++ b/ui/gl/gl.target.linux-x86.mk
@@ -21,9 +21,9 @@ $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_local_path
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/MesaLib/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc: $(LOCAL_PATH)/ui/gl/generate_bindings.py $(LOCAL_PATH)/third_party/mesa/src/include/GL/glext.h $(LOCAL_PATH)/third_party/khronos/GLES2/gl2ext.h $(LOCAL_PATH)/ui/gl/GL/glextchromium.h $(LOCAL_PATH)/gpu/GLES2/gl2chromium.h $(LOCAL_PATH)/gpu/GLES2/gl2extchromium.h $(LOCAL_PATH)/third_party/khronos/EGL/eglext.h $(LOCAL_PATH)/ui/gl/EGL/eglextchromium.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/wglext.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glx.h $(LOCAL_PATH)/third_party/mesa/src/include/GL/glxext.h $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: ui_gl_gl_gyp_gl_target_generate_gl_bindings ($@)"
- $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/MesaLib/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
+ $(hide)cd $(gyp_local_path)/ui/gl; mkdir -p $(gyp_shared_intermediate_dir)/ui/gl; python generate_bindings.py "--header-paths=../../third_party/mesa/src/include:../../third_party/khronos" "$(gyp_shared_intermediate_dir)/ui/gl"
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
$(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_api_autogen_egl.h: $(gyp_shared_intermediate_dir)/ui/gl/gl_bindings_autogen_egl.cc ;
@@ -179,7 +179,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -213,7 +212,7 @@ LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/swiftshader/include \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(gyp_shared_intermediate_dir)/ui/gl \
$(LOCAL_PATH)/third_party/khronos \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index e26f75943b..1bc4d122d1 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -20,6 +20,9 @@ namespace gfx {
namespace {
base::LazyInstance<base::ThreadLocalPointer<GLContext> >::Leaky
current_context_ = LAZY_INSTANCE_INITIALIZER;
+
+base::LazyInstance<base::ThreadLocalPointer<GLContext> >::Leaky
+ current_real_context_ = LAZY_INSTANCE_INITIALIZER;
} // namespace
GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group) {
@@ -32,7 +35,7 @@ GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group) {
GLContext::~GLContext() {
share_group_->RemoveContext(this);
if (GetCurrent() == this) {
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
}
}
@@ -90,8 +93,12 @@ GLContext* GLContext::GetCurrent() {
return current_context_.Pointer()->Get();
}
-void GLContext::SetCurrent(GLContext* context, GLSurface* surface) {
- current_context_.Pointer()->Set(context);
+GLContext* GLContext::GetRealCurrent() {
+ return current_real_context_.Pointer()->Get();
+}
+
+void GLContext::SetCurrent(GLSurface* surface) {
+ current_context_.Pointer()->Set(surface ? this : NULL);
GLSurface::SetCurrent(surface);
}
@@ -131,13 +138,23 @@ bool GLContext::MakeVirtuallyCurrent(
return virtual_gl_api_->MakeCurrent(virtual_context, surface);
}
-void GLContext::OnDestroyVirtualContext(GLContext* virtual_context) {
+void GLContext::OnReleaseVirtuallyCurrent(GLContext* virtual_context) {
if (virtual_gl_api_)
- virtual_gl_api_->OnDestroyVirtualContext(virtual_context);
+ virtual_gl_api_->OnReleaseVirtuallyCurrent(virtual_context);
}
void GLContext::SetRealGLApi() {
SetGLToRealGLApi();
}
+GLContextReal::GLContextReal(GLShareGroup* share_group)
+ : GLContext(share_group) {}
+
+GLContextReal::~GLContextReal() {}
+
+void GLContextReal::SetCurrent(GLSurface* surface) {
+ GLContext::SetCurrent(surface);
+ current_real_context_.Pointer()->Set(surface ? this : NULL);
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index fe8ada21e7..3eb390fce5 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -88,6 +88,7 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
static bool LosesAllContextsOnContextLost();
+ // Returns the last GLContext made current, virtual or real.
static GLContext* GetCurrent();
virtual bool WasAllocatedUsingRobustnessExtension();
@@ -99,24 +100,30 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
bool MakeVirtuallyCurrent(GLContext* virtual_context, GLSurface* surface);
// Notify this context that |virtual_context|, that was using us, is
- // being destroyed.
- void OnDestroyVirtualContext(GLContext* virtual_context);
+ // being released or destroyed.
+ void OnReleaseVirtuallyCurrent(GLContext* virtual_context);
protected:
virtual ~GLContext();
// Sets the GL api to the real hardware API (vs the VirtualAPI)
static void SetRealGLApi();
- static void SetCurrent(GLContext* context, GLSurface* surface);
+ virtual void SetCurrent(GLSurface* surface);
// Initialize function pointers to extension functions in the GL
// implementation. Should be called immediately after this context is made
// current.
bool InitializeExtensionBindings();
+ // Returns the last real (non-virtual) GLContext made current.
+ static GLContext* GetRealCurrent();
+
private:
friend class base::RefCounted<GLContext>;
+ // For GetRealCurrent.
+ friend class VirtualGLApi;
+
scoped_refptr<GLShareGroup> share_group_;
scoped_ptr<VirtualGLApi> virtual_gl_api_;
scoped_ptr<GLStateRestorer> state_restorer_;
@@ -124,6 +131,19 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
DISALLOW_COPY_AND_ASSIGN(GLContext);
};
+class GL_EXPORT GLContextReal : public GLContext {
+ public:
+ explicit GLContextReal(GLShareGroup* share_group);
+
+ protected:
+ virtual ~GLContextReal();
+
+ virtual void SetCurrent(GLSurface* surface) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GLContextReal);
+};
+
} // namespace gfx
#endif // UI_GL_GL_CONTEXT_H_
diff --git a/ui/gl/gl_context_android.cc b/ui/gl/gl_context_android.cc
index 88de4fc6f4..552b05542a 100644
--- a/ui/gl/gl_context_android.cc
+++ b/ui/gl/gl_context_android.cc
@@ -19,7 +19,7 @@ namespace {
// Used to render into an already current context+surface,
// that we do not have ownership of (draw callback).
-class GLNonOwnedContext : public GLContext {
+class GLNonOwnedContext : public GLContextReal {
public:
GLNonOwnedContext(GLShareGroup* share_group);
@@ -44,10 +44,10 @@ class GLNonOwnedContext : public GLContext {
};
GLNonOwnedContext::GLNonOwnedContext(GLShareGroup* share_group)
- : GLContext(share_group) {}
+ : GLContextReal(share_group) {}
bool GLNonOwnedContext::MakeCurrent(GLSurface* surface) {
- SetCurrent(this, surface);
+ SetCurrent(surface);
SetRealGLApi();
return true;
}
diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc
index a4347e9280..d826d81dc0 100644
--- a/ui/gl/gl_context_cgl.cc
+++ b/ui/gl/gl_context_cgl.cc
@@ -65,7 +65,7 @@ static CGLPixelFormatObj GetPixelFormat() {
}
GLContextCGL::GLContextCGL(GLShareGroup* share_group)
- : GLContext(share_group),
+ : GLContextReal(share_group),
context_(NULL),
gpu_preference_(PreferIntegratedGpu),
discrete_pixelformat_(NULL),
@@ -186,7 +186,7 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) {
return false;
}
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
return false;
@@ -205,7 +205,7 @@ void GLContextCGL::ReleaseCurrent(GLSurface* surface) {
if (!IsCurrent(surface))
return;
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
CGLSetCurrentContext(NULL);
}
@@ -215,7 +215,7 @@ bool GLContextCGL::IsCurrent(GLSurface* surface) {
// If our context is current then our notion of which GLContext is
// current must be correct. On the other hand, third-party code
// using OpenGL might change the current context.
- DCHECK(!native_context_is_current || (GetCurrent() == this));
+ DCHECK(!native_context_is_current || (GetRealCurrent() == this));
if (!native_context_is_current)
return false;
diff --git a/ui/gl/gl_context_cgl.h b/ui/gl/gl_context_cgl.h
index 94392bb02b..a83eaafb2c 100644
--- a/ui/gl/gl_context_cgl.h
+++ b/ui/gl/gl_context_cgl.h
@@ -14,7 +14,7 @@ namespace gfx {
class GLSurface;
// Encapsulates a CGL OpenGL context.
-class GLContextCGL : public GLContext {
+class GLContextCGL : public GLContextReal {
public:
explicit GLContextCGL(GLShareGroup* share_group);
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index ee815bf4d6..7354c7d82e 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -25,7 +25,7 @@ using ui::GetLastEGLErrorString;
namespace gfx {
GLContextEGL::GLContextEGL(GLShareGroup* share_group)
- : GLContext(share_group),
+ : GLContextReal(share_group),
context_(NULL),
display_(NULL),
config_(NULL),
@@ -112,7 +112,7 @@ bool GLContextEGL::MakeCurrent(GLSurface* surface) {
return false;
}
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
return false;
@@ -138,7 +138,7 @@ void GLContextEGL::ReleaseCurrent(GLSurface* surface) {
if (unbind_fbo_on_makecurrent_)
glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
eglMakeCurrent(display_,
EGL_NO_SURFACE,
EGL_NO_SURFACE,
@@ -153,7 +153,7 @@ bool GLContextEGL::IsCurrent(GLSurface* surface) {
// If our context is current then our notion of which GLContext is
// current must be correct. On the other hand, third-party code
// using OpenGL might change the current context.
- DCHECK(!native_context_is_current || (GetCurrent() == this));
+ DCHECK(!native_context_is_current || (GetRealCurrent() == this));
if (!native_context_is_current)
return false;
diff --git a/ui/gl/gl_context_egl.h b/ui/gl/gl_context_egl.h
index f694ba24da..9dd9a72d68 100644
--- a/ui/gl/gl_context_egl.h
+++ b/ui/gl/gl_context_egl.h
@@ -19,7 +19,7 @@ namespace gfx {
class GLSurface;
// Encapsulates an EGL OpenGL ES context.
-class GLContextEGL : public GLContext {
+class GLContextEGL : public GLContextReal {
public:
explicit GLContextEGL(GLShareGroup* share_group);
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
index c47a10d9e0..662538beb5 100644
--- a/ui/gl/gl_context_glx.cc
+++ b/ui/gl/gl_context_glx.cc
@@ -11,7 +11,7 @@ extern "C" {
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/GL/glextchromium.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
@@ -34,7 +34,7 @@ class ScopedPtrXFree {
} // namespace
GLContextGLX::GLContextGLX(GLShareGroup* share_group)
- : GLContext(share_group),
+ : GLContextReal(share_group),
context_(NULL),
display_(NULL) {
}
@@ -123,7 +123,7 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
return false;
}
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
Destroy();
@@ -145,7 +145,7 @@ void GLContextGLX::ReleaseCurrent(GLSurface* surface) {
if (!IsCurrent(surface))
return;
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
if (!glXMakeContextCurrent(display_, 0, 0, 0))
LOG(ERROR) << "glXMakeCurrent failed in ReleaseCurrent";
}
@@ -157,7 +157,7 @@ bool GLContextGLX::IsCurrent(GLSurface* surface) {
// If our context is current then our notion of which GLContext is
// current must be correct. On the other hand, third-party code
// using OpenGL might change the current context.
- DCHECK(!native_context_is_current || (GetCurrent() == this));
+ DCHECK(!native_context_is_current || (GetRealCurrent() == this));
if (!native_context_is_current)
return false;
diff --git a/ui/gl/gl_context_glx.h b/ui/gl/gl_context_glx.h
index 2847881b05..f5f9a48504 100644
--- a/ui/gl/gl_context_glx.h
+++ b/ui/gl/gl_context_glx.h
@@ -17,7 +17,7 @@ namespace gfx {
class GLSurface;
// Encapsulates a GLX OpenGL context.
-class GL_EXPORT GLContextGLX : public GLContext {
+class GL_EXPORT GLContextGLX : public GLContextReal {
public:
explicit GLContextGLX(GLShareGroup* share_group);
diff --git a/ui/gl/gl_context_mac.mm b/ui/gl/gl_context_mac.mm
index dbb073069e..4233fe8618 100644
--- a/ui/gl/gl_context_mac.mm
+++ b/ui/gl/gl_context_mac.mm
@@ -6,7 +6,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/gl_context_cgl.h"
#include "ui/gl/gl_context_osmesa.h"
#include "ui/gl/gl_context_stub.h"
diff --git a/ui/gl/gl_context_nsview.h b/ui/gl/gl_context_nsview.h
index bb2aa78107..f4f4df713b 100644
--- a/ui/gl/gl_context_nsview.h
+++ b/ui/gl/gl_context_nsview.h
@@ -17,7 +17,7 @@ class GLSurface;
// GLContextNSView encapsulates an NSView-based GLContext. This is paired with
// the GLSurfaceNSView class.
-class GLContextNSView : public GLContext {
+class GLContextNSView : public GLContextReal {
public:
explicit GLContextNSView(GLShareGroup* group);
virtual ~GLContextNSView();
diff --git a/ui/gl/gl_context_nsview.mm b/ui/gl/gl_context_nsview.mm
index 898bf014d8..464ca3e62f 100644
--- a/ui/gl/gl_context_nsview.mm
+++ b/ui/gl/gl_context_nsview.mm
@@ -64,7 +64,7 @@ bool GLContextNSView::MakeCurrent(GLSurface* surface) {
[context_ setView:view];
[context_ makeCurrentContext];
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!surface->OnMakeCurrent(this)) {
LOG(ERROR) << "Unable to make gl context current.";
diff --git a/ui/gl/gl_context_osmesa.cc b/ui/gl/gl_context_osmesa.cc
index a279177011..71154eca09 100644
--- a/ui/gl/gl_context_osmesa.cc
+++ b/ui/gl/gl_context_osmesa.cc
@@ -14,7 +14,7 @@
namespace gfx {
GLContextOSMesa::GLContextOSMesa(GLShareGroup* share_group)
- : GLContext(share_group),
+ : GLContextReal(share_group),
context_(NULL) {
}
@@ -65,7 +65,7 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) {
// Row 0 is at the top.
OSMesaPixelStore(OSMESA_Y_UP, 0);
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
return false;
@@ -84,7 +84,7 @@ void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) {
if (!IsCurrent(surface))
return;
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0);
}
@@ -97,7 +97,7 @@ bool GLContextOSMesa::IsCurrent(GLSurface* surface) {
// If our context is current then our notion of which GLContext is
// current must be correct. On the other hand, third-party code
// using OpenGL might change the current context.
- DCHECK(!native_context_is_current || (GetCurrent() == this));
+ DCHECK(!native_context_is_current || (GetRealCurrent() == this));
if (!native_context_is_current)
return false;
@@ -121,7 +121,6 @@ void* GLContextOSMesa::GetHandle() {
void GLContextOSMesa::SetSwapInterval(int interval) {
DCHECK(IsCurrent(NULL));
- DLOG(INFO) << "GLContextOSMesa::SetSwapInterval is ignored.";
}
GLContextOSMesa::~GLContextOSMesa() {
diff --git a/ui/gl/gl_context_osmesa.h b/ui/gl/gl_context_osmesa.h
index 382e8cee87..f78b525db5 100644
--- a/ui/gl/gl_context_osmesa.h
+++ b/ui/gl/gl_context_osmesa.h
@@ -17,7 +17,7 @@ class GLShareGroup;
class GLSurface;
// Encapsulates an OSMesa OpenGL context that uses software rendering.
-class GLContextOSMesa : public GLContext {
+class GLContextOSMesa : public GLContextReal {
public:
explicit GLContextOSMesa(GLShareGroup* share_group);
diff --git a/ui/gl/gl_context_stub.cc b/ui/gl/gl_context_stub.cc
index 2b72c8f8c6..7c63ff2e46 100644
--- a/ui/gl/gl_context_stub.cc
+++ b/ui/gl/gl_context_stub.cc
@@ -6,7 +6,7 @@
namespace gfx {
-GLContextStub::GLContextStub() : GLContext(NULL) {}
+GLContextStub::GLContextStub() : GLContextReal(NULL) {}
bool GLContextStub::Initialize(
GLSurface* compatible_surface, GpuPreference gpu_preference) {
@@ -16,12 +16,13 @@ bool GLContextStub::Initialize(
void GLContextStub::Destroy() {}
bool GLContextStub::MakeCurrent(GLSurface* surface) {
- SetCurrent(this, surface);
+ SetCurrent(surface);
SetRealGLApi();
return true;
}
void GLContextStub::ReleaseCurrent(GLSurface* surface) {
+ SetCurrent(NULL);
}
bool GLContextStub::IsCurrent(GLSurface* surface) {
diff --git a/ui/gl/gl_context_stub.h b/ui/gl/gl_context_stub.h
index ba130f6911..8fca5b71dc 100644
--- a/ui/gl/gl_context_stub.h
+++ b/ui/gl/gl_context_stub.h
@@ -10,7 +10,7 @@
namespace gfx {
// A GLContext that does nothing for unit tests.
-class GL_EXPORT GLContextStub : public GLContext {
+class GL_EXPORT GLContextStub : public GLContextReal {
public:
GLContextStub();
diff --git a/ui/gl/gl_context_wgl.cc b/ui/gl/gl_context_wgl.cc
index 916e49df5f..dba107bedc 100644
--- a/ui/gl/gl_context_wgl.cc
+++ b/ui/gl/gl_context_wgl.cc
@@ -15,7 +15,7 @@
namespace gfx {
GLContextWGL::GLContextWGL(GLShareGroup* share_group)
- : GLContext(share_group),
+ : GLContextReal(share_group),
context_(NULL) {
}
@@ -81,7 +81,7 @@ bool GLContextWGL::MakeCurrent(GLSurface* surface) {
return false;
}
- SetCurrent(this, surface);
+ SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
return false;
@@ -100,7 +100,7 @@ void GLContextWGL::ReleaseCurrent(GLSurface* surface) {
if (!IsCurrent(surface))
return;
- SetCurrent(NULL, NULL);
+ SetCurrent(NULL);
wglMakeCurrent(NULL, NULL);
}
@@ -111,7 +111,7 @@ bool GLContextWGL::IsCurrent(GLSurface* surface) {
// If our context is current then our notion of which GLContext is
// current must be correct. On the other hand, third-party code
// using OpenGL might change the current context.
- DCHECK(!native_context_is_current || (GetCurrent() == this));
+ DCHECK(!native_context_is_current || (GetRealCurrent() == this));
if (!native_context_is_current)
return false;
diff --git a/ui/gl/gl_context_wgl.h b/ui/gl/gl_context_wgl.h
index d3f6541ffb..13a274be71 100644
--- a/ui/gl/gl_context_wgl.h
+++ b/ui/gl/gl_context_wgl.h
@@ -15,7 +15,7 @@ namespace gfx {
class GLSurface;
// This class is a wrapper around a GL context.
-class GLContextWGL : public GLContext {
+class GLContextWGL : public GLContextReal {
public:
explicit GLContextWGL(GLShareGroup* share_group);
virtual ~GLContextWGL();
diff --git a/ui/gl/gl_egl_api_implementation.cc b/ui/gl/gl_egl_api_implementation.cc
index ba3e9cf923..43aa138a3f 100644
--- a/ui/gl/gl_egl_api_implementation.cc
+++ b/ui/gl/gl_egl_api_implementation.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "ui/gl/gl_egl_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
namespace gfx {
@@ -64,6 +65,21 @@ void RealEGLApi::Initialize(DriverEGL* driver) {
TraceEGLApi::~TraceEGLApi() {
}
+bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo* info) {
+ EGLDisplay display = eglGetCurrentDisplay();
+ const char* vendor = eglQueryString(display, EGL_VENDOR);
+ const char* version = eglQueryString(display, EGL_VERSION);
+ const char* extensions = eglQueryString(display, EGL_EXTENSIONS);
+ *info = GLWindowSystemBindingInfo();
+ if (vendor)
+ info->vendor = vendor;
+ if (version)
+ info->version = version;
+ if (extensions)
+ info->extensions = extensions;
+ return true;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_egl_api_implementation.h b/ui/gl/gl_egl_api_implementation.h
index cbc92e536a..96860cf30b 100644
--- a/ui/gl/gl_egl_api_implementation.h
+++ b/ui/gl/gl_egl_api_implementation.h
@@ -12,11 +12,13 @@
namespace gfx {
class GLContext;
+struct GLWindowSystemBindingInfo;
void InitializeGLBindingsEGL();
void InitializeGLExtensionBindingsEGL(GLContext* context);
void InitializeDebugGLBindingsEGL();
void ClearGLBindingsEGL();
+bool GetGLWindowSystemBindingInfoEGL(GLWindowSystemBindingInfo* info);
class GL_EXPORT EGLApiBase : public EGLApi {
public:
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index a8f671e911..65f29c6bf3 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -254,22 +254,19 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
bool switched_contexts = g_current_gl_context != this;
GLSurface* current_surface = GLSurface::GetCurrent();
if (switched_contexts || surface != current_surface) {
- if (!switched_contexts && current_surface &&
- virtual_context->IsCurrent(surface)) {
- // MakeCurrent 'lite' path that avoids potentially expensive MakeCurrent()
- // calls if the GLSurface uses the same underlying surface or renders to
- // an FBO.
- if (!surface->OnMakeCurrent(real_context_)) {
- LOG(ERROR) << "Could not make GLSurface current.";
+ // MakeCurrent 'lite' path that avoids potentially expensive MakeCurrent()
+ // calls if the GLSurface uses the same underlying surface or renders to
+ // an FBO.
+ if (switched_contexts || !current_surface ||
+ !virtual_context->IsCurrent(surface)) {
+ if (!real_context_->MakeCurrent(surface)) {
return false;
}
- } else if (!real_context_->MakeCurrent(surface)) {
- return false;
}
}
- DCHECK(GLSurface::GetCurrent());
- DCHECK(real_context_->IsCurrent(GLSurface::GetCurrent()));
+ DCHECK_EQ(real_context_, GLContext::GetRealCurrent());
+ DCHECK(real_context_->IsCurrent(NULL));
DCHECK(virtual_context->IsCurrent(surface));
if (switched_contexts || virtual_context != current_context_) {
@@ -290,10 +287,16 @@ bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) {
SetGLApi(temp);
}
SetGLApi(this);
+
+ virtual_context->SetCurrent(surface);
+ if (!surface->OnMakeCurrent(virtual_context)) {
+ LOG(ERROR) << "Could not make GLSurface current.";
+ return false;
+ }
return true;
}
-void VirtualGLApi::OnDestroyVirtualContext(GLContext* virtual_context) {
+void VirtualGLApi::OnReleaseVirtuallyCurrent(GLContext* virtual_context) {
if (current_context_ == virtual_context)
current_context_ = NULL;
}
diff --git a/ui/gl/gl_gl_api_implementation.h b/ui/gl/gl_gl_api_implementation.h
index 579739e335..d925b93990 100644
--- a/ui/gl/gl_gl_api_implementation.h
+++ b/ui/gl/gl_gl_api_implementation.h
@@ -76,7 +76,7 @@ class GL_EXPORT VirtualGLApi : public GLApiBase {
// Sets the current virutal context.
bool MakeCurrent(GLContext* virtual_context, GLSurface* surface);
- void OnDestroyVirtualContext(GLContext* virtual_context);
+ void OnReleaseVirtuallyCurrent(GLContext* virtual_context);
// Overridden functions from GLApiBase
virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE;
diff --git a/ui/gl/gl_glx_api_implementation.cc b/ui/gl/gl_glx_api_implementation.cc
index f8e75a2cb0..4a43534ec7 100644
--- a/ui/gl/gl_glx_api_implementation.cc
+++ b/ui/gl/gl_glx_api_implementation.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "ui/gl/gl_glx_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
namespace gfx {
@@ -64,6 +65,25 @@ void RealGLXApi::Initialize(DriverGLX* driver) {
TraceGLXApi::~TraceGLXApi() {
}
+bool GetGLWindowSystemBindingInfoGLX(GLWindowSystemBindingInfo* info) {
+ Display* display = glXGetCurrentDisplay();
+ const int kDefaultScreen = 0;
+ const char* vendor =
+ glXQueryServerString(display, kDefaultScreen, GLX_VENDOR);
+ const char* version =
+ glXQueryServerString(display, kDefaultScreen, GLX_VERSION);
+ const char* extensions =
+ glXQueryServerString(display, kDefaultScreen, GLX_EXTENSIONS);
+ *info = GLWindowSystemBindingInfo();
+ if (vendor)
+ info->vendor = vendor;
+ if (version)
+ info->version = version;
+ if (extensions)
+ info->extensions = extensions;
+ return true;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_glx_api_implementation.h b/ui/gl/gl_glx_api_implementation.h
index 04249f38c7..97542ded48 100644
--- a/ui/gl/gl_glx_api_implementation.h
+++ b/ui/gl/gl_glx_api_implementation.h
@@ -12,11 +12,13 @@
namespace gfx {
class GLContext;
+struct GLWindowSystemBindingInfo;
void InitializeGLBindingsGLX();
void InitializeGLExtensionBindingsGLX(GLContext* context);
void InitializeDebugGLBindingsGLX();
void ClearGLBindingsGLX();
+bool GetGLWindowSystemBindingInfoGLX(GLWindowSystemBindingInfo* info);
class GL_EXPORT GLXApiBase : public GLXApi {
public:
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
index c813fcb96c..212978270d 100644
--- a/ui/gl/gl_implementation.h
+++ b/ui/gl/gl_implementation.h
@@ -27,6 +27,12 @@ enum GLImplementation {
kGLImplementationMockGL
};
+struct GLWindowSystemBindingInfo {
+ std::string vendor;
+ std::string version;
+ std::string extensions;
+};
+
void GetAllowedGLImplementations(std::vector<GLImplementation>* impls);
#if defined(OS_WIN)
@@ -80,6 +86,10 @@ void* GetGLCoreProcAddress(const char* name);
// Find an entry point in the current GL implementation.
void* GetGLProcAddress(const char* name);
+// Return information about the GL window system binding implementation (e.g.,
+// EGL, GLX, WGL). Returns true if the information was retrieved successfully.
+GL_EXPORT bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info);
+
} // namespace gfx
#endif // UI_GL_GL_IMPLEMENTATION_H_
diff --git a/ui/gl/gl_implementation_android.cc b/ui/gl/gl_implementation_android.cc
index d948c5782f..f644866b3d 100644
--- a/ui/gl/gl_implementation_android.cc
+++ b/ui/gl/gl_implementation_android.cc
@@ -132,4 +132,14 @@ void ClearGLBindings() {
UnloadGLNativeLibraries();
}
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+ return false;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_implementation_mac.cc b/ui/gl/gl_implementation_mac.cc
index 09af157c10..36bb7e37e5 100644
--- a/ui/gl/gl_implementation_mac.cc
+++ b/ui/gl/gl_implementation_mac.cc
@@ -143,4 +143,8 @@ void ClearGLBindings() {
UnloadGLNativeLibraries();
}
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ return false;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_implementation_ozone.cc b/ui/gl/gl_implementation_ozone.cc
index b3bdfc93f9..481a309e0c 100644
--- a/ui/gl/gl_implementation_ozone.cc
+++ b/ui/gl/gl_implementation_ozone.cc
@@ -96,4 +96,14 @@ void ClearGLBindings() {
UnloadGLNativeLibraries();
}
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+ return false;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_implementation_win.cc b/ui/gl/gl_implementation_win.cc
index f0c562648b..2851a6108e 100644
--- a/ui/gl/gl_implementation_win.cc
+++ b/ui/gl/gl_implementation_win.cc
@@ -274,4 +274,16 @@ void ClearGLBindings() {
UnloadGLNativeLibraries();
}
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationDesktopGL:
+ return GetGLWindowSystemBindingInfoWGL(info);
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+ return false;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_implementation_x11.cc b/ui/gl/gl_implementation_x11.cc
index 2da82547a0..afaa319fdf 100644
--- a/ui/gl/gl_implementation_x11.cc
+++ b/ui/gl/gl_implementation_x11.cc
@@ -229,4 +229,16 @@ void ClearGLBindings() {
UnloadGLNativeLibraries();
}
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationDesktopGL:
+ return GetGLWindowSystemBindingInfoGLX(info);
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+ return false;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_jni_headers.target.darwin-arm.mk b/ui/gl/gl_jni_headers.target.darwin-arm.mk
index 9d285547d6..10a7c87f80 100644
--- a/ui/gl/gl_jni_headers.target.darwin-arm.mk
+++ b/ui/gl/gl_jni_headers.target.darwin-arm.mk
@@ -17,13 +17,13 @@ GYP_TARGET_DEPENDENCIES := \
### Generated for rule "ui_gl_gl_gyp_gl_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../../base/android/jni_generator/jni_generator.py', '../../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0', '--jarjar', '../../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0 --jarjar ../../android_webview/build/jarjar-rules.txt
.PHONY: ui_gl_gl_jni_headers_gyp_rule_trigger
ui_gl_gl_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h
@@ -86,7 +86,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/gl_jni_headers.target.darwin-x86.mk b/ui/gl/gl_jni_headers.target.darwin-x86.mk
index e820bedddc..4ea32af384 100644
--- a/ui/gl/gl_jni_headers.target.darwin-x86.mk
+++ b/ui/gl/gl_jni_headers.target.darwin-x86.mk
@@ -17,13 +17,13 @@ GYP_TARGET_DEPENDENCIES := \
### Generated for rule "ui_gl_gl_gyp_gl_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../../base/android/jni_generator/jni_generator.py', '../../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0', '--jarjar', '../../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0 --jarjar ../../android_webview/build/jarjar-rules.txt
.PHONY: ui_gl_gl_jni_headers_gyp_rule_trigger
ui_gl_gl_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h
@@ -88,7 +88,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/gl_jni_headers.target.linux-arm.mk b/ui/gl/gl_jni_headers.target.linux-arm.mk
index 9d285547d6..10a7c87f80 100644
--- a/ui/gl/gl_jni_headers.target.linux-arm.mk
+++ b/ui/gl/gl_jni_headers.target.linux-arm.mk
@@ -17,13 +17,13 @@ GYP_TARGET_DEPENDENCIES := \
### Generated for rule "ui_gl_gl_gyp_gl_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../../base/android/jni_generator/jni_generator.py', '../../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0', '--jarjar', '../../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0 --jarjar ../../android_webview/build/jarjar-rules.txt
.PHONY: ui_gl_gl_jni_headers_gyp_rule_trigger
ui_gl_gl_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h
@@ -86,7 +86,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/gl_jni_headers.target.linux-x86.mk b/ui/gl/gl_jni_headers.target.linux-x86.mk
index e820bedddc..4ea32af384 100644
--- a/ui/gl/gl_jni_headers.target.linux-x86.mk
+++ b/ui/gl/gl_jni_headers.target.linux-x86.mk
@@ -17,13 +17,13 @@ GYP_TARGET_DEPENDENCIES := \
### Generated for rule "ui_gl_gl_gyp_gl_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../../base/android/jni_generator/jni_generator.py', '../../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/gl/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java'], 'action': ['../../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/gl/jni', '--optimize_generation', '0', '--jarjar', '../../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/gl/jni; cd $(gyp_local_path)/ui/gl; ../../base/android/jni_generator/jni_generator.py --input_file ../android/java/src/org/chromium/ui/gfx/SurfaceTextureListener.java --output_dir "$(gyp_shared_intermediate_dir)/ui/gl/jni" --optimize_generation 0 --jarjar ../../android_webview/build/jarjar-rules.txt
.PHONY: ui_gl_gl_jni_headers_gyp_rule_trigger
ui_gl_gl_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/gl/jni/SurfaceTextureListener_jni.h
@@ -88,7 +88,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 107330447b..84efbc6176 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -16,6 +16,7 @@
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_stub.h"
+#include "ui/gl/scoped_make_current.h"
#if defined(USE_X11)
extern "C" {
@@ -410,20 +411,23 @@ bool NativeViewGLSurfaceEGL::Resize(const gfx::Size& size) {
if (size == GetSize())
return true;
+ scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
GLContext* current_context = GLContext::GetCurrent();
- bool was_current = current_context && current_context->IsCurrent(this);
- if (was_current)
+ bool was_current =
+ current_context && current_context->IsCurrent(this);
+ if (was_current) {
+ scoped_make_current.reset(
+ new ui::ScopedMakeCurrent(current_context, this));
current_context->ReleaseCurrent(this);
+ }
Destroy();
if (!Initialize()) {
- LOG(ERROR) << "Failed to resize pbuffer.";
+ LOG(ERROR) << "Failed to resize window.";
return false;
}
- if (was_current)
- return current_context->MakeCurrent(this);
return true;
}
@@ -554,8 +558,14 @@ bool PbufferGLSurfaceEGL::Resize(const gfx::Size& size) {
if (size == size_)
return true;
+ scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
GLContext* current_context = GLContext::GetCurrent();
- bool was_current = current_context && current_context->IsCurrent(this);
+ bool was_current =
+ current_context && current_context->IsCurrent(this);
+ if (was_current) {
+ scoped_make_current.reset(
+ new ui::ScopedMakeCurrent(current_context, this));
+ }
size_ = size;
@@ -564,9 +574,6 @@ bool PbufferGLSurfaceEGL::Resize(const gfx::Size& size) {
return false;
}
- if (was_current)
- return current_context->MakeCurrent(this);
-
return true;
}
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 71adc9475e..52a96a7131 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -20,7 +20,7 @@ extern "C" {
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
#include "base/time.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/base/x/x11_util.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
@@ -309,6 +309,9 @@ bool GLSurfaceGLX::InitializeOneOff() {
if (initialized)
return true;
+ // http://crbug.com/245466
+ setenv("force_s3tc_enable", "true", 1);
+
// SGIVideoSyncProviderShim (if instantiated) will issue X commands on
// it's own thread.
XInitThreads();
diff --git a/ui/gl/gl_surface_mac.cc b/ui/gl/gl_surface_mac.cc
index df542a1526..099ff9e338 100644
--- a/ui/gl/gl_surface_mac.cc
+++ b/ui/gl/gl_surface_mac.cc
@@ -7,7 +7,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_cgl.h"
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
index 7994eec379..9a556bc998 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -6,6 +6,7 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_surface_osmesa.h"
+#include "ui/gl/scoped_make_current.h"
namespace gfx {
@@ -23,10 +24,15 @@ void GLSurfaceOSMesa::Destroy() {
}
bool GLSurfaceOSMesa::Resize(const gfx::Size& new_size) {
+ scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
GLContext* current_context = GLContext::GetCurrent();
- bool was_current = current_context && current_context->IsCurrent(this);
- if (was_current)
+ bool was_current =
+ current_context && current_context->IsCurrent(this);
+ if (was_current) {
+ scoped_make_current.reset(
+ new ui::ScopedMakeCurrent(current_context, this));
current_context->ReleaseCurrent(this);
+ }
// Preserve the old buffer.
scoped_ptr<int32[]> old_buffer(buffer_.release());
@@ -48,9 +54,6 @@ bool GLSurfaceOSMesa::Resize(const gfx::Size& new_size) {
size_ = new_size;
- if (was_current)
- return current_context->MakeCurrent(this);
-
return true;
}
diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc
index b07dff4f19..02120ce01b 100644
--- a/ui/gl/gl_surface_win.cc
+++ b/ui/gl/gl_surface_win.cc
@@ -7,7 +7,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc
index 8a63a005bc..58112d364e 100644
--- a/ui/gl/gl_surface_x11.cc
+++ b/ui/gl/gl_surface_x11.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
+#include "third_party/mesa/src/include/GL/osmesa.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
diff --git a/ui/gl/gl_wgl_api_implementation.cc b/ui/gl/gl_wgl_api_implementation.cc
index 063916af04..e3f71d8359 100644
--- a/ui/gl/gl_wgl_api_implementation.cc
+++ b/ui/gl/gl_wgl_api_implementation.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "ui/gl/gl_wgl_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
namespace gfx {
@@ -64,6 +65,14 @@ void RealWGLApi::Initialize(DriverWGL* driver) {
TraceWGLApi::~TraceWGLApi() {
}
+bool GetGLWindowSystemBindingInfoWGL(GLWindowSystemBindingInfo* info) {
+ const char* extensions = wglGetExtensionsStringEXT();
+ *info = GLWindowSystemBindingInfo();
+ if (extensions)
+ info->extensions = extensions;
+ return true;
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_wgl_api_implementation.h b/ui/gl/gl_wgl_api_implementation.h
index 6f0421f0df..9e1188903a 100644
--- a/ui/gl/gl_wgl_api_implementation.h
+++ b/ui/gl/gl_wgl_api_implementation.h
@@ -12,11 +12,13 @@
namespace gfx {
class GLContext;
+struct GLWindowSystemBindingInfo;
void InitializeGLBindingsWGL();
void InitializeGLExtensionBindingsWGL(GLContext* context);
void InitializeDebugGLBindingsWGL();
void ClearGLBindingsWGL();
+bool GetGLWindowSystemBindingInfoWGL(GLWindowSystemBindingInfo* info);
class GL_EXPORT WGLApiBase : public WGLApi {
public:
diff --git a/ui/gl/surface_jni_headers.target.darwin-arm.mk b/ui/gl/surface_jni_headers.target.darwin-arm.mk
index 40776c6eaf..e953df77a9 100644
--- a/ui/gl/surface_jni_headers.target.darwin-arm.mk
+++ b/ui/gl/surface_jni_headers.target.darwin-arm.mk
@@ -79,7 +79,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_jni_headers.target.darwin-x86.mk b/ui/gl/surface_jni_headers.target.darwin-x86.mk
index c6fbcd1212..58c93c0151 100644
--- a/ui/gl/surface_jni_headers.target.darwin-x86.mk
+++ b/ui/gl/surface_jni_headers.target.darwin-x86.mk
@@ -81,7 +81,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_jni_headers.target.linux-arm.mk b/ui/gl/surface_jni_headers.target.linux-arm.mk
index 40776c6eaf..e953df77a9 100644
--- a/ui/gl/surface_jni_headers.target.linux-arm.mk
+++ b/ui/gl/surface_jni_headers.target.linux-arm.mk
@@ -79,7 +79,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_jni_headers.target.linux-x86.mk b/ui/gl/surface_jni_headers.target.linux-x86.mk
index c6fbcd1212..58c93c0151 100644
--- a/ui/gl/surface_jni_headers.target.linux-x86.mk
+++ b/ui/gl/surface_jni_headers.target.linux-x86.mk
@@ -81,7 +81,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_texture_jni_headers.target.darwin-arm.mk b/ui/gl/surface_texture_jni_headers.target.darwin-arm.mk
index b4d3b21f89..ae531d5b28 100644
--- a/ui/gl/surface_texture_jni_headers.target.darwin-arm.mk
+++ b/ui/gl/surface_texture_jni_headers.target.darwin-arm.mk
@@ -79,7 +79,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_texture_jni_headers.target.darwin-x86.mk b/ui/gl/surface_texture_jni_headers.target.darwin-x86.mk
index d0b9f1f40a..44c7c8bed7 100644
--- a/ui/gl/surface_texture_jni_headers.target.darwin-x86.mk
+++ b/ui/gl/surface_texture_jni_headers.target.darwin-x86.mk
@@ -81,7 +81,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_texture_jni_headers.target.linux-arm.mk b/ui/gl/surface_texture_jni_headers.target.linux-arm.mk
index b4d3b21f89..ae531d5b28 100644
--- a/ui/gl/surface_texture_jni_headers.target.linux-arm.mk
+++ b/ui/gl/surface_texture_jni_headers.target.linux-arm.mk
@@ -79,7 +79,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/gl/surface_texture_jni_headers.target.linux-x86.mk b/ui/gl/surface_texture_jni_headers.target.linux-x86.mk
index d0b9f1f40a..44c7c8bed7 100644
--- a/ui/gl/surface_texture_jni_headers.target.linux-x86.mk
+++ b/ui/gl/surface_texture_jni_headers.target.linux-x86.mk
@@ -81,7 +81,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/keyboard/keyboard.cc b/ui/keyboard/keyboard.cc
index d41f89725d..9a18cb2a25 100644
--- a/ui/keyboard/keyboard.cc
+++ b/ui/keyboard/keyboard.cc
@@ -66,6 +66,11 @@ class KeyboardWebUIControllerFactory : public content::WebUIControllerFactory {
namespace keyboard {
void InitializeKeyboard() {
+ static bool initialized = false;
+ if (initialized)
+ return;
+ initialized = true;
+
base::FilePath pak_dir;
PathService::Get(base::DIR_MODULE, &pak_dir);
base::FilePath pak_file = pak_dir.Append(
diff --git a/ui/keyboard/keyboard.gyp b/ui/keyboard/keyboard.gyp
index 19536929e3..1cd00ceaf6 100644
--- a/ui/keyboard/keyboard.gyp
+++ b/ui/keyboard/keyboard.gyp
@@ -38,10 +38,10 @@
'dependencies': [
'../../base/base.gyp:base',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../content/content.gyp:content_browser',
'../../ipc/ipc.gyp:ipc',
'../../skia/skia.gyp:skia',
+ '../../url/url.gyp:url_lib',
'../aura/aura.gyp:aura',
'../compositor/compositor.gyp:compositor',
'../ui.gyp:ui',
@@ -83,7 +83,6 @@
'../aura/aura.gyp:aura',
'../aura/aura.gyp:aura_test_support',
'../compositor/compositor.gyp:compositor',
- '../compositor/compositor.gyp:compositor_test_support',
'../ui.gyp:run_ui_unittests',
'../ui.gyp:ui',
'keyboard',
diff --git a/ui/keyboard/keyboard.h b/ui/keyboard/keyboard.h
index 83826d1f71..ce14a0b98b 100644
--- a/ui/keyboard/keyboard.h
+++ b/ui/keyboard/keyboard.h
@@ -12,7 +12,7 @@ namespace keyboard {
// Initializes the keyboard module. This includes adding the necessary pak files
// for loading resources used in for the virtual keyboard, and registers
// a WebUIControllerFactory for creating a WebUIController necessary for the
-// virtual keyboard.
+// virtual keyboard. This becomes a no-op after the first call.
KEYBOARD_EXPORT void InitializeKeyboard();
} // namespace keyboard
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index 0f502c4ca1..1a970d4852 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -117,6 +117,9 @@ class TestTextInputClient : public ui::TextInputClient {
virtual void ClearCompositionText() OVERRIDE {}
virtual void InsertText(const string16& text) OVERRIDE {}
virtual void InsertChar(char16 ch, int flags) OVERRIDE {}
+ virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE {
+ return static_cast<gfx::NativeWindow>(NULL);
+ }
virtual ui::TextInputType GetTextInputType() const OVERRIDE {
return type_;
}
diff --git a/ui/keyboard/keyboard_test_suite.cc b/ui/keyboard/keyboard_test_suite.cc
index f756a13ebd..5b4db504d3 100644
--- a/ui/keyboard/keyboard_test_suite.cc
+++ b/ui/keyboard/keyboard_test_suite.cc
@@ -5,7 +5,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/compositor/compositor_setup.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/test/test_suite.h"
class KeyboardTestSuite : public ui::test::UITestSuite {
@@ -25,12 +24,10 @@ class KeyboardTestSuite : public ui::test::UITestSuite {
void KeyboardTestSuite::Initialize() {
ui::test::UITestSuite::Initialize();
- ui::CompositorTestSupport::Initialize();
ui::SetupTestCompositor();
}
void KeyboardTestSuite::Shutdown() {
- ui::CompositorTestSupport::Terminate();
ui::test::UITestSuite::Shutdown();
}
diff --git a/ui/message_center/cocoa/notification_controller.h b/ui/message_center/cocoa/notification_controller.h
index c051dd89a7..46965a7dde 100644
--- a/ui/message_center/cocoa/notification_controller.h
+++ b/ui/message_center/cocoa/notification_controller.h
@@ -46,6 +46,9 @@ MESSAGE_CENTER_EXPORT
// Body text of the message.
scoped_nsobject<NSTextField> message_;
+ // Container for optional list item views.
+ scoped_nsobject<NSView> listItemView_;
+
// Container for optional items at the bottom of the notification.
scoped_nsobject<NSView> bottomView_;
}
@@ -69,6 +72,9 @@ MESSAGE_CENTER_EXPORT
// been deleted.
- (const std::string&)notificationID;
+// Called when the user clicks within the notification view.
+- (void)notificationClicked;
+
@end
#endif // UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_
diff --git a/ui/message_center/cocoa/notification_controller.mm b/ui/message_center/cocoa/notification_controller.mm
index fb99ce970d..96fe6048ef 100644
--- a/ui/message_center/cocoa/notification_controller.mm
+++ b/ui/message_center/cocoa/notification_controller.mm
@@ -5,12 +5,14 @@
#import "ui/message_center/cocoa/notification_controller.h"
#include "base/mac/foundation_util.h"
+#include "base/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/strings/sys_string_conversions.h"
#include "grit/ui_resources.h"
#include "skia/ext/skia_utils_mac.h"
-#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#import "ui/base/cocoa/hover_image_button.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/text/text_elider.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_style.h"
#include "ui/message_center/notification.h"
@@ -65,7 +67,7 @@
NSFontAttributeName :
[title attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL],
NSForegroundColorAttributeName :
- gfx::SkColorToDeviceNSColor(message_center::kRegularTextColor),
+ gfx::SkColorToCalibratedNSColor(message_center::kRegularTextColor),
};
[[title string] drawWithRect:frame
options:(NSStringDrawingUsesLineFragmentOrigin |
@@ -87,7 +89,39 @@
}
@end
+@interface MCNotificationView : NSBox {
+ @private
+ MCNotificationController* controller_;
+}
+
+- (id)initWithController:(MCNotificationController*)controller
+ frame:(NSRect)frame;
+@end
+
+@implementation MCNotificationView
+- (id)initWithController:(MCNotificationController*)controller
+ frame:(NSRect)frame {
+ if ((self = [super initWithFrame:frame]))
+ controller_ = controller;
+ return self;
+}
+
+- (void)mouseDown:(NSEvent*)event {
+ if ([event type] != NSLeftMouseDown) {
+ [super mouseDown:event];
+ return;
+ }
+ [controller_ notificationClicked];
+}
+@end
+
@interface MCNotificationController (Private)
+// Returns a string with item's title in title color and item's message in
+// message color.
++ (NSAttributedString*)
+ attributedStringForItem:(const message_center::NotificationItem&)item
+ font:(NSFont*)font;
+
// Configures a NSBox to be borderless, titleless, and otherwise appearance-
// free.
- (void)configureCustomBox:(NSBox*)box;
@@ -112,6 +146,13 @@
// rectangle is to the right of the icon and left of the control buttons.
// This depends on the icon_ and closeButton_ being initialized.
- (NSRect)currentContentRect;
+
+// Returns the wrapped text that could fit within the given text field with not
+// more than the given number of lines. The Ellipsis could be added at the end
+// of the last line if it is too long.
+- (string16)wrapText:(const string16&)text
+ forField:(NSTextField*)field
+ maxNumberOfLines:(size_t)lines;
@end
@implementation MCNotificationController
@@ -131,7 +172,9 @@
NSRect rootFrame = NSMakeRect(0, 0,
message_center::kNotificationPreferredImageSize,
message_center::kNotificationIconSize);
- scoped_nsobject<NSBox> rootView([[NSBox alloc] initWithFrame:rootFrame]);
+ scoped_nsobject<MCNotificationView> rootView(
+ [[MCNotificationView alloc] initWithController:self
+ frame:rootFrame]);
[self configureCustomBox:rootView];
[rootView setFillColor:gfx::SkColorToCalibratedNSColor(
message_center::kNotificationBackgroundColor)];
@@ -169,36 +212,84 @@
// The message_center:: constants are relative to capHeight at the top and
// relative to the baseline at the bottom, but NSTextField uses the full line
// height for its height.
- CGFloat titleTopGap = [[title_ font] ascender] - [[title_ font] capHeight];
- CGFloat titleBottomGap = fabs([[title_ font] descender]);
+ CGFloat titleTopGap =
+ roundf([[title_ font] ascender] - [[title_ font] capHeight]);
+ CGFloat titleBottomGap = roundf(fabs([[title_ font] descender]));
CGFloat titlePadding = message_center::kTextTopPadding - titleTopGap;
CGFloat messageTopGap =
- [[message_ font] ascender] - [[message_ font] capHeight];
+ roundf([[message_ font] ascender] - [[message_ font] capHeight]);
CGFloat messagePadding =
message_center::kTextTopPadding - titleBottomGap - messageTopGap;
// Set the title and recalculate the frame.
- [title_ setStringValue:base::SysUTF16ToNSString(notification_->title())];
- [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:title_];
+ [title_ setStringValue:base::SysUTF16ToNSString(
+ [self wrapText:notification_->title()
+ forField:title_
+ maxNumberOfLines:message_center::kTitleLineLimit])];
+ [title_ sizeToFit];
NSRect titleFrame = [title_ frame];
titleFrame.origin.y = NSMaxY(rootFrame) - titlePadding - NSHeight(titleFrame);
// Set the message and recalculate the frame.
- [message_ setStringValue:base::SysUTF16ToNSString(notification_->message())];
- [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:message_];
+ [message_ setStringValue:base::SysUTF16ToNSString(
+ [self wrapText:notification_->message()
+ forField:title_
+ maxNumberOfLines:message_center::kMessageExpandedLineLimit])];
+ [message_ sizeToFit];
NSRect messageFrame = [message_ frame];
messageFrame.origin.y =
NSMinY(titleFrame) - messagePadding - NSHeight(messageFrame);
messageFrame.size.height = NSHeight([message_ frame]);
- // In this basic notification UI, the message body is the bottom-most
- // vertical element. If it is out of the rootView's bounds, resize the view.
- if (NSMinY(messageFrame) < messagePadding) {
- CGFloat delta = messagePadding - NSMinY(messageFrame);
+ // Create the list item views (up to a maximum).
+ [listItemView_ removeFromSuperview];
+ const std::vector<message_center::NotificationItem>& items =
+ notification->items();
+ NSRect listFrame = NSZeroRect;
+ if (items.size() > 0) {
+ listFrame = [self currentContentRect];
+ listFrame.origin.y = 0;
+ listFrame.size.height = 0;
+ listItemView_.reset([[NSView alloc] initWithFrame:listFrame]);
+ CGFloat y = 0;
+
+ NSFont* font = [NSFont systemFontOfSize:message_center::kMessageFontSize];
+ CGFloat lineHeight = roundf(NSHeight([font boundingRectForFont]));
+
+ const int kNumNotifications =
+ std::min(items.size(), message_center::kNotificationMaximumItems);
+ for (int i = kNumNotifications - 1; i >= 0; --i) {
+ NSTextField* field = [self newLabelWithFrame:
+ NSMakeRect(0, y, NSWidth(listFrame), lineHeight)];
+ [[field cell] setUsesSingleLineMode:YES];
+ [field setAttributedStringValue:
+ [MCNotificationController attributedStringForItem:items[i]
+ font:font]];
+ [listItemView_ addSubview:field];
+ y += lineHeight;
+ }
+ // TODO(thakis): The spacing is not completely right.
+ CGFloat listTopPadding =
+ message_center::kTextTopPadding - messageTopGap;
+ listFrame.size.height = y;
+ listFrame.origin.y =
+ NSMinY(messageFrame) - listTopPadding - NSHeight(listFrame);
+ [listItemView_ setFrame:listFrame];
+ [[self view] addSubview:listItemView_];
+ }
+
+ // If the bottom-most element so far is out of the rootView's bounds, resize
+ // the view.
+ CGFloat minY = NSMinY(messageFrame);
+ if (listItemView_ && NSMinY(listFrame) < minY)
+ minY = NSMinY(listFrame);
+ if (minY < messagePadding) {
+ CGFloat delta = messagePadding - minY;
rootFrame.size.height += delta;
titleFrame.origin.y += delta;
messageFrame.origin.y += delta;
+ listFrame.origin.y += delta;
}
// Add the bottom container view.
@@ -267,10 +358,12 @@
rootFrame.size.height += NSHeight(frame);
titleFrame.origin.y += NSHeight(frame);
messageFrame.origin.y += NSHeight(frame);
+ listFrame.origin.y += NSHeight(frame);
[[self view] setFrame:rootFrame];
[title_ setFrame:titleFrame];
[message_ setFrame:messageFrame];
+ [listItemView_ setFrame:listFrame];
return rootFrame;
}
@@ -291,8 +384,48 @@
return notificationID_;
}
+- (void)notificationClicked {
+ messageCenter_->ClickOnNotification([self notificationID]);
+}
+
// Private /////////////////////////////////////////////////////////////////////
++ (NSAttributedString*)
+ attributedStringForItem:(const message_center::NotificationItem&)item
+ font:(NSFont*)font {
+ NSString* text = base::SysUTF16ToNSString(
+ item.title + base::UTF8ToUTF16(" ") + item.message);
+ NSMutableAttributedString* formattedText =
+ [[[NSMutableAttributedString alloc] initWithString:text] autorelease];
+
+ scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
+ [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
+ NSDictionary* sharedAttribs = @{
+ NSFontAttributeName : font,
+ NSParagraphStyleAttributeName : paragraphStyle,
+ };
+ const NSRange range = NSMakeRange(0, [formattedText length] - 1);
+ [formattedText addAttributes:sharedAttribs range:range];
+
+ NSDictionary* titleAttribs = @{
+ NSForegroundColorAttributeName :
+ gfx::SkColorToCalibratedNSColor(message_center::kRegularTextColor),
+ };
+ const NSRange titleRange = NSMakeRange(0, item.title.size());
+ [formattedText addAttributes:titleAttribs range:titleRange];
+
+ NSDictionary* messageAttribs = @{
+ NSForegroundColorAttributeName :
+ gfx::SkColorToCalibratedNSColor(message_center::kDimTextColor),
+ };
+ const NSRange messageRange =
+ NSMakeRange(item.title.size() + 1, item.message.size());
+ [formattedText addAttributes:messageAttribs range:messageRange];
+
+ return formattedText;
+}
+
- (void)configureCustomBox:(NSBox*)box {
[box setBoxType:NSBoxCustom];
[box setBorderType:NSNoBorder];
@@ -382,4 +515,28 @@
return contentFrame;
}
+- (string16)wrapText:(const string16&)text
+ forField:(NSTextField*)field
+ maxNumberOfLines:(size_t)lines {
+ gfx::Font font([field font]);
+ int width = NSWidth([self currentContentRect]);
+ int height = (lines + 1) * font.GetHeight();
+
+ std::vector<string16> wrapped;
+ ui::ElideRectangleText(text, font, width, height,
+ ui::WRAP_LONG_WORDS, &wrapped);
+
+ if (wrapped.size() > lines) {
+ // Add an ellipsis to the last line. If this ellipsis makes the last line
+ // too wide, that line will be further elided by the ui::ElideText below.
+ string16 last = wrapped[lines - 1] + UTF8ToUTF16(ui::kEllipsis);
+ if (font.GetStringWidth(last) > width)
+ last = ui::ElideText(last, font, width, ui::ELIDE_AT_END);
+ wrapped.resize(lines - 1);
+ wrapped.push_back(last);
+ }
+
+ return JoinString(wrapped, '\n');
+}
+
@end
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 71cd328d8b..76a4e209c5 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -8,7 +8,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#import "ui/base/cocoa/hover_image_button.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
#include "ui/message_center/fake_message_center.h"
@@ -83,6 +83,10 @@ class MockMessageCenter : public message_center::FakeMessageCenter {
- (NSTextField*)messageView {
return message_.get();
}
+
+- (NSView*)listItemView {
+ return listItemView_.get();
+}
@end
class NotificationControllerTest : public ui::CocoaTest {
@@ -99,6 +103,7 @@ TEST_F(NotificationControllerTest, BasicLayout) {
"",
ASCIIToUTF16("Added to circles"),
ASCIIToUTF16("Jonathan and 5 others"),
+ gfx::Image(),
string16(),
std::string(),
NULL,
@@ -128,6 +133,7 @@ TEST_F(NotificationControllerTest, OverflowText) {
ASCIIToUTF16("And even the message is long. This sure is a wordy "
"notification. Are you really going to read this "
"entire thing?"),
+ gfx::Image(),
string16(),
std::string(),
NULL,
@@ -148,6 +154,7 @@ TEST_F(NotificationControllerTest, Close) {
"an_id",
string16(),
string16(),
+ gfx::Image(),
string16(),
std::string(),
NULL,
@@ -174,6 +181,7 @@ TEST_F(NotificationControllerTest, Update) {
ASCIIToUTF16("A simple title"),
ASCIIToUTF16("This message isn't too long and should fit in the"
"default bounds."),
+ gfx::Image(),
string16(),
std::string(),
NULL,
@@ -207,6 +215,7 @@ TEST_F(NotificationControllerTest, Buttons) {
"an_id",
string16(),
string16(),
+ gfx::Image(),
string16(),
std::string(),
&buttons,
@@ -231,6 +240,7 @@ TEST_F(NotificationControllerTest, Image) {
"an_id",
string16(),
string16(),
+ gfx::Image(),
string16(),
std::string(),
NULL,
@@ -250,3 +260,43 @@ TEST_F(NotificationControllerTest, Image) {
isKindOfClass:[NSImageView class]]);
EXPECT_EQ(image, [[[controller bottomSubviews] lastObject] image]);
}
+
+TEST_F(NotificationControllerTest, List) {
+ base::ListValue* list = new base::ListValue;
+
+ base::DictionaryValue* item0 = new base::DictionaryValue;
+ item0->SetString(message_center::kItemTitleKey, "First title");
+ item0->SetString(message_center::kItemMessageKey, "first message");
+ list->Append(item0);
+
+ base::DictionaryValue* item1 = new base::DictionaryValue;
+ item1->SetString(message_center::kItemTitleKey, "Second title");
+ item1->SetString(message_center::kItemMessageKey,
+ "second slightly longer message");
+ list->Append(item1);
+
+ base::DictionaryValue items;
+ items.Set(message_center::kItemsKey, list);
+
+ scoped_ptr<message_center::Notification> notification(
+ new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_BASE_FORMAT,
+ "an_id",
+ string16(),
+ string16(),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ &items,
+ NULL));
+
+ MockMessageCenter message_center;
+ scoped_nsobject<MCNotificationController> controller(
+ [[MCNotificationController alloc] initWithNotification:notification.get()
+ messageCenter:&message_center]);
+ [controller view];
+
+ EXPECT_EQ(2u, [[[controller listItemView] subviews] count]);
+ EXPECT_TRUE(NSMaxY([[controller listItemView] frame]) <
+ NSMinY([[controller messageView] frame]));
+}
diff --git a/ui/message_center/cocoa/popup_collection.h b/ui/message_center/cocoa/popup_collection.h
index 47a00ca24e..af06bf5ee9 100644
--- a/ui/message_center/cocoa/popup_collection.h
+++ b/ui/message_center/cocoa/popup_collection.h
@@ -39,6 +39,10 @@ MESSAGE_CENTER_EXPORT
// Array of all on-screen popup notifications.
scoped_nsobject<NSMutableArray> popups_;
+ // Array of all on-screen popup notifications that are being faded out
+ // for removal.
+ scoped_nsobject<NSMutableArray> popupsBeingRemoved_;
+
// For testing only. If not a zero rect, this is the screen size to use
// for laying out popups.
NSRect testingScreenFrame_;
diff --git a/ui/message_center/cocoa/popup_collection.mm b/ui/message_center/cocoa/popup_collection.mm
index dc9e9397da..cc54b34214 100644
--- a/ui/message_center/cocoa/popup_collection.mm
+++ b/ui/message_center/cocoa/popup_collection.mm
@@ -10,9 +10,7 @@
#include "ui/message_center/message_center_observer.h"
#include "ui/message_center/message_center_style.h"
-namespace {
const float kAnimationDuration = 0.2;
-} // namespace
@interface MCPopupCollection (Private)
// Returns the primary screen's visible frame rectangle.
@@ -93,12 +91,15 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
messageCenter_ = messageCenter;
observer_.reset(new PopupCollectionObserver(messageCenter_, self));
popups_.reset([[NSMutableArray alloc] init]);
+ popupsBeingRemoved_.reset([[NSMutableArray alloc] init]);
popupAnimationDuration_ = kAnimationDuration;
}
return self;
}
- (void)dealloc {
+ [popupsBeingRemoved_ makeObjectsPerformSelector:
+ @selector(markPopupCollectionGone)];
[self removeAllNotifications];
[super dealloc];
}
@@ -112,6 +113,13 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
}
- (void)onPopupAnimationEnded:(const std::string&)notificationID {
+ NSUInteger index = [popupsBeingRemoved_ indexOfObjectPassingTest:
+ ^BOOL(id popup, NSUInteger index, BOOL* stop) {
+ return [popup notificationID] == notificationID;
+ }];
+ if (index != NSNotFound)
+ [popupsBeingRemoved_ removeObjectAtIndex:index];
+
animatingNotificationIDs_.erase(notificationID);
if (![self isAnimating])
[self layoutNotifications];
@@ -182,6 +190,7 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
bounds.origin.y = y;
[popup showWithAnimation:bounds];
[popups_ addObject:popup];
+ messageCenter_->DisplayedNotification(notification->id());
return YES;
}
@@ -309,6 +318,11 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
if (index != NSNotFound) {
[[popups_ objectAtIndex:index] closeWithAnimation];
animatingNotificationIDs_.insert(notificationID);
+
+ // Still need to track popup object and only remove it after the animation
+ // ends. We need to notify these objects that the collection is gone
+ // in the collection destructor.
+ [popupsBeingRemoved_ addObject:[popups_ objectAtIndex:index]];
[popups_ removeObjectAtIndex:index];
}
}
@@ -330,10 +344,11 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
const std::string& notificationID = (*iter)->id();
// Does the notification need to be updated?
- if (pendingUpdateNotificationIDs_.find(notificationID) ==
- pendingUpdateNotificationIDs_.end()) {
+ std::set<std::string>::iterator pendingUpdateIter =
+ pendingUpdateNotificationIDs_.find(notificationID);
+ if (pendingUpdateIter == pendingUpdateNotificationIDs_.end())
continue;
- }
+ pendingUpdateNotificationIDs_.erase(pendingUpdateIter);
// Is the notification still on screen?
NSUInteger index = [self indexOfPopupWithNotificationID:notificationID];
@@ -357,6 +372,14 @@ class PopupCollectionObserver : public message_center::MessageCenterObserver {
}
}
+ // Notification update could be received when a notification is excluded from
+ // the popup notification list but still remains in the full notification
+ // list, as in clicking the popup. In that case, the popup should be closed.
+ for (auto iter = pendingUpdateNotificationIDs_.begin();
+ iter != pendingUpdateNotificationIDs_.end(); ++iter) {
+ pendingRemoveNotificationIDs_.insert(*iter);
+ }
+
pendingUpdateNotificationIDs_.clear();
// Start re-layout of all notifications, so that it readjusts the Y origin of
diff --git a/ui/message_center/cocoa/popup_collection_unittest.mm b/ui/message_center/cocoa/popup_collection_unittest.mm
index c76a1b6831..22dc51f22e 100644
--- a/ui/message_center/cocoa/popup_collection_unittest.mm
+++ b/ui/message_center/cocoa/popup_collection_unittest.mm
@@ -9,7 +9,7 @@
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
#import "ui/message_center/cocoa/notification_controller.h"
#import "ui/message_center/cocoa/popup_controller.h"
@@ -47,36 +47,47 @@ class PopupCollectionTest : public ui::CocoaTest {
}
void AddThreeNotifications() {
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("One"),
- ASCIIToUTF16("This is the first notification to"
- " be displayed"),
- string16(),
- std::string(),
- NULL,
- NULL);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "2",
- ASCIIToUTF16("Two"),
- ASCIIToUTF16("This is the second notification."),
- string16(),
- std::string(),
- NULL,
- NULL);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "3",
- ASCIIToUTF16("Three"),
- ASCIIToUTF16("This is the third notification "
- "that has a much longer body "
- "than the other notifications. It "
- "may not fit on the screen if we "
- "set the screen size too small."),
- string16(),
- std::string(),
- NULL,
- NULL);
-
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One"),
+ ASCIIToUTF16("This is the first notification to"
+ " be displayed"),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
+
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "2",
+ ASCIIToUTF16("Two"),
+ ASCIIToUTF16("This is the second notification."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
+
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "3",
+ ASCIIToUTF16("Three"),
+ ASCIIToUTF16("This is the third notification "
+ "that has a much longer body "
+ "than the other notifications. It "
+ "may not fit on the screen if we "
+ "set the screen size too small."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
WaitForAnimationEnded();
}
@@ -124,14 +135,19 @@ TEST_F(PopupCollectionTest, AttemptFourOneOffscreen) {
AddThreeNotifications();
EXPECT_EQ(2u, [[collection_ popups] count]); // "3" does not fit on screen.
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "4",
- ASCIIToUTF16("Four"),
- ASCIIToUTF16("This is the fourth notification."),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "4",
+ ASCIIToUTF16("Four"),
+ ASCIIToUTF16("This is the fourth notification."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
WaitForAnimationEnded();
// Remove "1" and "3" should fit on screen.
@@ -170,14 +186,18 @@ TEST_F(PopupCollectionTest, LayoutSpacing) {
scoped_ptr<base::DictionaryValue> optional(new base::DictionaryValue);
optional->SetInteger(message_center::kPriorityKey,
message_center::HIGH_PRIORITY);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "4",
- ASCIIToUTF16("Four"),
- ASCIIToUTF16("This is the fourth notification."),
- string16(),
- std::string(),
- optional.get(),
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "4",
+ ASCIIToUTF16("Four"),
+ ASCIIToUTF16("This is the fourth notification."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ optional.get(),
+ NULL));
+ center_->AddNotification(notification.Pass());
WaitForAnimationEnded();
EXPECT_TRUE(CheckSpacingBetween([popups objectAtIndex:2],
[popups objectAtIndex:3]));
@@ -203,32 +223,41 @@ TEST_F(PopupCollectionTest, TinyScreen) {
[collection_ setScreenFrame:NSMakeRect(0, 0, 800, 100)];
EXPECT_EQ(0u, [[collection_ popups] count]);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("One"),
- ASCIIToUTF16("This is the first notification to"
- " be displayed"),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One"),
+ ASCIIToUTF16("This is the first notification to"
+ " be displayed"),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
WaitForAnimationEnded();
EXPECT_EQ(1u, [[collection_ popups] count]);
// Now give the notification a longer message so that it no longer fits.
- center_->UpdateNotification("1",
- "1",
- ASCIIToUTF16("One"),
- ASCIIToUTF16("This is now a very very very very "
- "very very very very very very very "
- "very very very very very very very "
- "very very very very very very very "
- "very very very very very very very "
- "very very very very very very very "
- "very very very very very very very "
- "long notification."),
- NULL,
- NULL);
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One"),
+ ASCIIToUTF16("This is now a very very very very "
+ "very very very very very very very "
+ "very very very very very very very "
+ "very very very very very very very "
+ "very very very very very very very "
+ "very very very very very very very "
+ "very very very very very very very "
+ "long notification."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->UpdateNotification("1", notification.Pass());
WaitForAnimationEnded();
EXPECT_EQ(0u, [[collection_ popups] count]);
}
@@ -257,18 +286,22 @@ TEST_F(PopupCollectionTest, UpdateIconAndBody) {
// Replace "1".
controller = [[popups objectAtIndex:0] notificationController];
NSRect old_frame = [[controller view] frame];
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("One is going to get a much longer "
- "title than it previously had."),
- ASCIIToUTF16("This is the first notification to "
- "be displayed, but it will also be "
- "updated to have a significantly "
- "longer body"),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One is going to get a much longer "
+ "title than it previously had."),
+ ASCIIToUTF16("This is the first notification to "
+ "be displayed, but it will also be "
+ "updated to have a significantly "
+ "longer body"),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
WaitForAnimationEnded();
EXPECT_GT(NSHeight([[controller view] frame]), NSHeight(old_frame));
@@ -282,3 +315,57 @@ TEST_F(PopupCollectionTest, UpdateIconAndBody) {
EXPECT_EQ("2", [[popups objectAtIndex:1] notificationID]);
EXPECT_EQ("3", [[popups objectAtIndex:2] notificationID]);
}
+
+TEST_F(PopupCollectionTest, CloseCollectionBeforeNewPopupAnimationEnds) {
+ // Add a notification and don't wait for the animation to finish.
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One"),
+ ASCIIToUTF16("This is the first notification to"
+ " be displayed"),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
+
+ // Release the popup collection before the animation ends. No crash should
+ // be expected.
+ collection_.reset();
+}
+
+TEST_F(PopupCollectionTest, CloseCollectionBeforeClosePopupAnimationEnds) {
+ AddThreeNotifications();
+
+ // Remove a notification and don't wait for the animation to finish.
+ center_->RemoveNotification("1", true);
+
+ // Release the popup collection before the animation ends. No crash should
+ // be expected.
+ collection_.reset();
+}
+
+TEST_F(PopupCollectionTest, CloseCollectionBeforeUpdatePopupAnimationEnds) {
+ AddThreeNotifications();
+
+ // Update a notification and don't wait for the animation to finish.
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("One"),
+ ASCIIToUTF16("New message."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->UpdateNotification("1", notification.Pass());
+
+ // Release the popup collection before the animation ends. No crash should
+ // be expected.
+ collection_.reset();
+}
diff --git a/ui/message_center/cocoa/popup_controller.mm b/ui/message_center/cocoa/popup_controller.mm
index 5a237ca518..b1c35cd656 100644
--- a/ui/message_center/cocoa/popup_controller.mm
+++ b/ui/message_center/cocoa/popup_controller.mm
@@ -7,6 +7,7 @@
#include <cmath>
#import "base/mac/foundation_util.h"
+#import "base/mac/sdk_forward_declarations.h"
#import "ui/base/cocoa/window_size_constants.h"
#import "ui/message_center/cocoa/notification_controller.h"
#import "ui/message_center/cocoa/popup_collection.h"
@@ -17,35 +18,6 @@
enum {
NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8
};
-
-enum {
- NSEventPhaseNone = 0, // event not associated with a phase.
- NSEventPhaseBegan = 0x1 << 0,
- NSEventPhaseStationary = 0x1 << 1,
- NSEventPhaseChanged = 0x1 << 2,
- NSEventPhaseEnded = 0x1 << 3,
- NSEventPhaseCancelled = 0x1 << 4,
-};
-typedef NSUInteger NSEventPhase;
-
-enum {
- NSEventSwipeTrackingLockDirection = 0x1 << 0,
- NSEventSwipeTrackingClampGestureAmount = 0x1 << 1
-};
-typedef NSUInteger NSEventSwipeTrackingOptions;
-
-@interface NSEvent (LionAPI)
-- (NSEventPhase)phase;
-- (CGFloat)scrollingDeltaX;
-- (CGFloat)scrollingDeltaY;
-- (void)trackSwipeEventWithOptions:(NSEventSwipeTrackingOptions)options
- dampenAmountThresholdMin:(CGFloat)minDampenThreshold
- max:(CGFloat)maxDampenThreshold
- usingHandler:(void (^)(CGFloat gestureAmount,
- NSEventPhase phase,
- BOOL isComplete,
- BOOL* stop))trackingHandler;
-@end
#endif // MAC_OS_X_VERSION_10_7
////////////////////////////////////////////////////////////////////////////////
@@ -58,7 +30,7 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
// Window Subclass /////////////////////////////////////////////////////////////
-@interface MCPopupWindow : NSWindow {
+@interface MCPopupWindow : NSPanel {
// The cumulative X and Y scrollingDeltas since the -scrollWheel: event began.
NSPoint totalScrollDelta_;
}
@@ -89,9 +61,15 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
if (shouldTrackSwipe) {
MCPopupController* controller =
base::mac::ObjCCastStrict<MCPopupController>([self windowController]);
+ BOOL directionInverted = [event isDirectionInvertedFromDevice];
auto handler = ^(CGFloat gestureAmount, NSEventPhase phase,
BOOL isComplete, BOOL* stop) {
+ // The swipe direction should match the direction the user's fingers
+ // are moving, not the interpreted scroll direction.
+ if (directionInverted)
+ gestureAmount *= -1;
+
if (phase == NSEventPhaseBegan) {
[controller notificationSwipeStarted];
return;
@@ -103,7 +81,7 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
if (ended || isComplete)
[controller notificationSwipeEnded:ended complete:isComplete];
};
- [event trackSwipeEventWithOptions:0
+ [event trackSwipeEventWithOptions:NSEventSwipeTrackingLockDirection
dampenAmountThresholdMin:-1
max:1
usingHandler:handler];
@@ -121,7 +99,8 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
popupCollection:(MCPopupCollection*)popupCollection {
scoped_nsobject<MCPopupWindow> window(
[[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
- styleMask:NSBorderlessWindowMask
+ styleMask:NSBorderlessWindowMask |
+ NSNonactivatingPanelMask
backing:NSBackingStoreBuffered
defer:YES]);
if ((self = [super initWithWindow:window])) {
@@ -153,7 +132,10 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
boundsAnimation_.reset();
}
[super close];
- [self release];
+ [self performSelectorOnMainThread:@selector(release)
+ withObject:nil
+ waitUntilDone:NO
+ modes:@[ NSDefaultRunLoopMode ]];
}
- (MCNotificationController*)notificationController {
@@ -204,23 +186,42 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
}
- (void)showWithAnimation:(NSRect)newBounds {
+ bounds_ = newBounds;
NSRect startBounds = newBounds;
startBounds.origin.x += startBounds.size.width;
- startBounds.size.width = 0;
- bounds_ = startBounds;
[[self window] setFrame:startBounds display:NO];
+ [[self window] setAlphaValue:0];
[self showWindow:nil];
- [self setBounds:newBounds];
+
+ // Slide-in and fade-in simultaneously.
+ NSDictionary* animationDict = @{
+ NSViewAnimationTargetKey : [self window],
+ NSViewAnimationEndFrameKey : [NSValue valueWithRect:newBounds],
+ NSViewAnimationEffectKey : NSViewAnimationFadeInEffect
+ };
+ boundsAnimation_.reset([[NSViewAnimation alloc]
+ initWithViewAnimations:[NSArray arrayWithObject:animationDict]]);
+ [boundsAnimation_ setDuration:[popupCollection_ popupAnimationDuration]];
+ [boundsAnimation_ setDelegate:self];
+ [boundsAnimation_ startAnimation];
}
- (void)closeWithAnimation {
if (isClosing_)
return;
+
isClosing_ = YES;
+ // If the notification was swiped closed, do not animate it as the
+ // notification has already faded out.
+ if (swipeGestureEnded_) {
+ [self close];
+ return;
+ }
+
NSDictionary* animationDict = @{
- NSViewAnimationTargetKey: [self window],
- NSViewAnimationEffectKey: NSViewAnimationFadeOutEffect
+ NSViewAnimationTargetKey : [self window],
+ NSViewAnimationEffectKey : NSViewAnimationFadeOutEffect
};
boundsAnimation_.reset([[NSViewAnimation alloc]
initWithViewAnimations:[NSArray arrayWithObject:animationDict]]);
@@ -243,8 +244,8 @@ typedef NSUInteger NSEventSwipeTrackingOptions;
bounds_ = newBounds;
NSDictionary* animationDict = @{
- NSViewAnimationTargetKey: [self window],
- NSViewAnimationEndFrameKey: [NSValue valueWithRect:newBounds]
+ NSViewAnimationTargetKey : [self window],
+ NSViewAnimationEndFrameKey : [NSValue valueWithRect:newBounds]
};
boundsAnimation_.reset([[NSViewAnimation alloc]
initWithViewAnimations:[NSArray arrayWithObject:animationDict]]);
diff --git a/ui/message_center/cocoa/popup_controller_unittest.mm b/ui/message_center/cocoa/popup_controller_unittest.mm
index dd2503c78b..69bc8cfcfd 100644
--- a/ui/message_center/cocoa/popup_controller_unittest.mm
+++ b/ui/message_center/cocoa/popup_controller_unittest.mm
@@ -7,7 +7,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
#include "ui/message_center/notification.h"
@@ -21,6 +21,7 @@ TEST_F(PopupControllerTest, Creation) {
"",
ASCIIToUTF16("Added to circles"),
ASCIIToUTF16("Jonathan and 5 others"),
+ gfx::Image(),
string16(),
std::string(),
NULL,
diff --git a/ui/message_center/cocoa/settings_controller.h b/ui/message_center/cocoa/settings_controller.h
new file mode 100644
index 0000000000..a802ad4492
--- /dev/null
+++ b/ui/message_center/cocoa/settings_controller.h
@@ -0,0 +1,75 @@
+// 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 UI_MESSAGE_CENTER_COCOA_SETTINGS_CONTROLLER_H_
+#define UI_MESSAGE_CENTER_COCOA_SETTINGS_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#import "base/memory/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/message_center/message_center_export.h"
+#include "ui/message_center/notifier_settings.h"
+
+@class MCSettingsController;
+
+namespace message_center {
+
+// Bridge class between C++ and Cocoa world.
+class NotifierSettingsDelegateMac : public NotifierSettingsDelegate {
+ public:
+ NotifierSettingsDelegateMac(MCSettingsController* settings_controller)
+ : settings_controller_(settings_controller) {}
+ virtual ~NotifierSettingsDelegateMac();
+
+ MCSettingsController* cocoa_controller() { return settings_controller_; }
+
+ // Overridden from NotifierSettingsDelegate:
+ virtual void UpdateIconImage(const std::string& id,
+ const gfx::Image& icon) OVERRIDE;
+ virtual void UpdateFavicon(const GURL& url, const gfx::Image& icon) OVERRIDE;
+
+ private:
+ MCSettingsController* settings_controller_; // weak, owns this
+
+ DISALLOW_COPY_AND_ASSIGN(NotifierSettingsDelegateMac);
+};
+
+} // namespace message_center
+
+
+// The view controller responsible for the settings sheet in the center.
+MESSAGE_CENTER_EXPORT
+@interface MCSettingsController : NSViewController {
+ @private
+ scoped_ptr<message_center::NotifierSettingsDelegateMac> delegate_;
+ message_center::NotifierSettingsProvider* provider_;
+
+ // The "Settings" text at the top.
+ scoped_nsobject<NSTextField> settingsText_;
+
+ // The smaller text below the "Settings" text.
+ scoped_nsobject<NSTextField> detailsText_;
+
+ // Container for all the checkboxes.
+ scoped_nsobject<NSScrollView> scrollView_;
+
+ std::vector<message_center::Notifier*> notifiers_;
+}
+
+// Designated initializer.
+- (id)initWithProvider:(message_center::NotifierSettingsProvider*)provider;
+
+// Returns the bridge object for this controller.
+- (message_center::NotifierSettingsDelegateMac*)delegate;
+
+@end
+
+// Testing API /////////////////////////////////////////////////////////////////
+
+@interface MCSettingsController (TestingAPI)
+- (NSScrollView*)scrollView;
+@end
+
+#endif // UI_MESSAGE_CENTER_COCOA_SETTINGS_CONTROLLER_H_
diff --git a/ui/message_center/cocoa/settings_controller.mm b/ui/message_center/cocoa/settings_controller.mm
new file mode 100644
index 0000000000..bc663e27a1
--- /dev/null
+++ b/ui/message_center/cocoa/settings_controller.mm
@@ -0,0 +1,317 @@
+// 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 "ui/message_center/cocoa/settings_controller.h"
+
+#include "base/mac/foundation_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "grit/ui_strings.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+#import "base/memory/scoped_nsobject.h"
+#import "ui/message_center/cocoa/tray_view_controller.h"
+#include "ui/message_center/message_center_style.h"
+#include "skia/ext/skia_utils_mac.h"
+
+const int kMarginWidth = 16;
+const int kEntryHeight = 38;
+const int kIconSize = 16;
+const int kIconTextPadding = 10;
+const int kCheckmarkIconPadding = 20;
+
+const int kIntrinsicCheckmarkPadding = 4; // Padding already provided by Cocoa.
+const int kCorrectedCheckmarkPadding =
+ kCheckmarkIconPadding - kIntrinsicCheckmarkPadding;
+
+@interface MCSettingsButtonCell : NSButtonCell {
+ // A checkbox's regular image is the checkmark image. This additional image
+ // is used for the favicon or app icon shown next to the checkmark.
+ scoped_nsobject<NSImage> extraImage_;
+}
+- (void)setExtraImage:(NSImage*)extraImage;
+@end
+
+@implementation MCSettingsButtonCell
+- (void)setExtraImage:(NSImage*)extraImage {
+ extraImage_.reset([extraImage retain]);
+}
+
+- (NSRect)drawTitle:(NSAttributedString*)title
+ withFrame:(NSRect)frame
+ inView:(NSView*)controlView {
+ CGFloat inset = kCorrectedCheckmarkPadding;
+ // drawTitle:withFrame:inView: draws the checkmark image. Draw the extra
+ // image as part of the checkbox's text.
+ if (extraImage_) {
+ NSRect imageRect = frame;
+ imageRect.origin.x += inset;
+ imageRect.size = NSMakeSize(kIconSize, kIconSize);
+ [extraImage_ drawInRect:imageRect
+ fromRect:NSZeroRect
+ operation:NSCompositeSourceOver
+ fraction:1.0
+ respectFlipped:YES
+ hints:nil];
+
+ inset += kIconSize + kIconTextPadding;
+ }
+ frame.origin.x += inset;
+ frame.size.width -= inset;
+ return [super drawTitle:title withFrame:frame inView:controlView];
+}
+
+- (NSUInteger)hitTestForEvent:(NSEvent*)event
+ inRect:(NSRect)cellFrame
+ ofView:(NSView*)controlView {
+ NSUInteger result =
+ [super hitTestForEvent:event inRect:cellFrame ofView:controlView];
+ if (result == NSCellHitNone) {
+ // The default button cell does hit testing on the attributed string. Since
+ // this cell draws additional spacing and an icon in front of the string,
+ // tweak the hit testing result.
+ NSPoint point =
+ [controlView convertPoint:[event locationInWindow] fromView:nil];
+
+ NSRect rect = [self titleRectForBounds:[controlView bounds]];
+ rect.size = [[self attributedTitle] size];
+ rect.size.width += kCorrectedCheckmarkPadding;
+
+ if (extraImage_) {
+ rect.size.width +=
+ kIconSize + kIconTextPadding + kCorrectedCheckmarkPadding;
+ }
+
+ if (NSPointInRect(point, rect))
+ result = NSCellHitContentArea | NSCellHitTrackableArea;
+ }
+ return result;
+}
+@end
+
+@interface MCSettingsController (Private)
+// Sets the icon on the checkbox corresponding to |notifiers_[index]|.
+- (void)setIcon:(NSImage*)icon forNotifierIndex:(size_t)index;
+
+- (void)setIcon:(NSImage*)icon forAppId:(const std::string&)id;
+- (void)setIcon:(NSImage*)icon forURL:(const GURL&)url;
+
+// Returns the NSButton corresponding to the checkbox for |notifiers_[index]|.
+- (NSButton*)buttonForNotifierAtIndex:(size_t)index;
+@end
+
+namespace message_center {
+
+NotifierSettingsDelegateMac::~NotifierSettingsDelegateMac() {}
+
+void NotifierSettingsDelegateMac::UpdateIconImage(const std::string& id,
+ const gfx::Image& icon) {
+ [cocoa_controller() setIcon:icon.AsNSImage() forAppId:id];
+}
+
+void NotifierSettingsDelegateMac::UpdateFavicon(const GURL& url,
+ const gfx::Image& icon) {
+ [cocoa_controller() setIcon:icon.AsNSImage() forURL:url];
+}
+
+NotifierSettingsDelegate* ShowSettings(NotifierSettingsProvider* provider,
+ gfx::NativeView context) {
+ // The caller of this function (the tray) retains |controller| while it's
+ // visible.
+ MCSettingsController* controller =
+ [[[MCSettingsController alloc] initWithProvider:provider] autorelease];
+ return [controller delegate];
+}
+
+} // namespace message_center
+
+@implementation MCSettingsController
+
+- (id)initWithProvider:(message_center::NotifierSettingsProvider*)provider {
+ if ((self = [super initWithNibName:nil bundle:nil])) {
+ delegate_.reset(new message_center::NotifierSettingsDelegateMac(self));
+ provider_ = provider;
+ }
+ return self;
+}
+
+- (void)dealloc {
+ provider_->OnNotifierSettingsClosing();
+ [super dealloc];
+}
+
+- (NSTextField*)newLabelWithFrame:(NSRect)frame {
+ NSTextField* label = [[NSTextField alloc] initWithFrame:frame];
+ [label setDrawsBackground:NO];
+ [label setBezeled:NO];
+ [label setEditable:NO];
+ [label setSelectable:NO];
+ [label setAutoresizingMask:NSViewMinYMargin];
+ return label;
+}
+
+- (void)loadView {
+ provider_->GetNotifierList(&notifiers_);
+ CGFloat maxHeight = [MCTrayViewController maxTrayClientHeight];
+
+ // Container view.
+ NSRect fullFrame =
+ NSMakeRect(0, 0, [MCTrayViewController trayWidth], maxHeight);
+ scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:fullFrame]);
+ [view setBorderType:NSNoBorder];
+ [view setBoxType:NSBoxCustom];
+ [view setContentViewMargins:NSZeroSize];
+ [view setFillColor:gfx::SkColorToCalibratedNSColor(
+ message_center::kMessageCenterBackgroundColor)];
+ [view setTitlePosition:NSNoTitle];
+ [self setView:view];
+
+ // "Settings" text.
+ NSRect headerFrame = NSMakeRect(
+ kMarginWidth, kMarginWidth, NSWidth(fullFrame), NSHeight(fullFrame));
+ settingsText_.reset([self newLabelWithFrame:headerFrame]);
+ [settingsText_ setAutoresizingMask:NSViewMinYMargin];
+ [settingsText_ setTextColor:gfx::SkColorToCalibratedNSColor(
+ message_center::kRegularTextColor)];
+ [settingsText_ setFont:
+ [NSFont messageFontOfSize:message_center::kTitleFontSize]];
+
+ [settingsText_ setStringValue:
+ l10n_util::GetNSString(IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL)];
+ [settingsText_ sizeToFit];
+ headerFrame = [settingsText_ frame];
+ headerFrame.origin.y =
+ NSMaxY(fullFrame) - kMarginWidth - NSHeight(headerFrame);
+ [[self view] addSubview:settingsText_];
+
+ // Subheader.
+ NSRect subheaderFrame = NSMakeRect(
+ kMarginWidth, kMarginWidth, NSWidth(fullFrame), NSHeight(fullFrame));
+ detailsText_.reset([self newLabelWithFrame:subheaderFrame]);
+ [detailsText_ setAutoresizingMask:NSViewMinYMargin];
+ [detailsText_ setTextColor:gfx::SkColorToCalibratedNSColor(
+ message_center::kDimTextColor)];
+ [detailsText_ setFont:
+ [NSFont messageFontOfSize:message_center::kMessageFontSize]];
+
+ [detailsText_ setStringValue:l10n_util::GetNSString(
+ IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION)];
+ [detailsText_ sizeToFit];
+ subheaderFrame = [detailsText_ frame];
+ subheaderFrame.origin.y =
+ NSMinY(headerFrame) - message_center::kTextTopPadding -
+ NSHeight(subheaderFrame);
+ [[self view] addSubview:detailsText_];
+
+ // Document view for the notifier settings.
+ CGFloat y = 0;
+ NSRect documentFrame = NSMakeRect(0, 0, NSWidth(fullFrame), 0);
+ scoped_nsobject<NSView> documentView(
+ [[NSView alloc] initWithFrame:documentFrame]);
+ for (int i = notifiers_.size() - 1; i >= 0; --i) {
+ message_center::Notifier* notifier = notifiers_[i];
+
+ // TODO(thakis): Use a custom button cell.
+ NSRect frame = NSMakeRect(
+ kMarginWidth, y, NSWidth(documentFrame) - kMarginWidth, kEntryHeight);
+ scoped_nsobject<NSButton> button([[NSButton alloc] initWithFrame:frame]);
+ scoped_nsobject<MCSettingsButtonCell> cell(
+ [[MCSettingsButtonCell alloc]
+ initTextCell:base::SysUTF16ToNSString(notifier->name)]);
+ [button setCell:cell];
+ [button setButtonType:NSSwitchButton];
+
+ [button setState:notifier->enabled ? NSOnState : NSOffState];
+ [button setTag:i];
+ [button setTarget:self];
+ [button setAction:@selector(checkboxClicked:)];
+
+ [documentView addSubview:button.release()];
+
+ y += NSHeight(frame);
+ }
+ documentFrame.size.height = y;
+ [documentView setFrame:documentFrame];
+
+ // Scroll view for the notifier settings.
+ NSRect scrollFrame = documentFrame;
+ scrollFrame.origin.y = kMarginWidth;
+ CGFloat remainingHeight =
+ NSMinY(subheaderFrame) - message_center::kTextTopPadding -
+ NSMinY(scrollFrame);
+
+ if (NSHeight(documentFrame) < remainingHeight) {
+ // Everything fits without scrolling.
+ CGFloat delta = remainingHeight - NSHeight(documentFrame);
+ headerFrame.origin.y -= delta;
+ subheaderFrame.origin.y -= delta;
+ fullFrame.size.height -= delta;
+ } else {
+ scrollFrame.size.height = remainingHeight;
+ }
+
+ scrollView_.reset([[NSScrollView alloc] initWithFrame:scrollFrame]);
+ [scrollView_ setAutohidesScrollers:YES];
+ [scrollView_ setAutoresizingMask:NSViewMinYMargin];
+ [scrollView_ setDocumentView:documentView];
+ [scrollView_ setDrawsBackground:NO];
+ [scrollView_ setHasHorizontalScroller:NO];
+ [scrollView_ setHasVerticalScroller:YES];
+
+ // Set final sizes.
+ [[self view] setFrame:fullFrame];
+ [[self view] addSubview:scrollView_];
+ [settingsText_ setFrame:headerFrame];
+ [detailsText_ setFrame:subheaderFrame];
+}
+
+- (void)checkboxClicked:(id)sender {
+ provider_->SetNotifierEnabled(*notifiers_[[sender tag]],
+ [sender state] == NSOnState);
+}
+
+- (message_center::NotifierSettingsDelegateMac*)delegate {
+ return delegate_.get();
+}
+
+// Testing API /////////////////////////////////////////////////////////////////
+
+- (NSScrollView*)scrollView {
+ return scrollView_;
+}
+
+// Private API /////////////////////////////////////////////////////////////////
+
+- (void)setIcon:(NSImage*)icon forNotifierIndex:(size_t)index {
+ NSButton* button = [self buttonForNotifierAtIndex:index];
+ [[button cell] setExtraImage:icon];
+ [button setNeedsDisplay:YES];
+}
+
+- (void)setIcon:(NSImage*)icon forAppId:(const std::string&)id {
+ for (size_t i = 0; i < notifiers_.size(); ++i) {
+ if (notifiers_[i]->id == id) {
+ [self setIcon:icon forNotifierIndex:i];
+ return;
+ }
+ }
+}
+
+- (void)setIcon:(NSImage*)icon forURL:(const GURL&)url {
+ for (size_t i = 0; i < notifiers_.size(); ++i) {
+ if (notifiers_[i]->url == url) {
+ [self setIcon:icon forNotifierIndex:i];
+ return;
+ }
+ }
+}
+
+- (NSButton*)buttonForNotifierAtIndex:(size_t)index {
+ NSArray* subviews = [[scrollView_ documentView] subviews];
+ // The checkboxes are in bottom-top order, the checkbox for notifiers_[0] is
+ // last.
+ NSView* view = [subviews objectAtIndex:notifiers_.size() - 1 - index];
+ return base::mac::ObjCCastStrict<NSButton>(view);
+}
+
+@end
diff --git a/ui/message_center/cocoa/settings_controller_unittest.mm b/ui/message_center/cocoa/settings_controller_unittest.mm
new file mode 100644
index 0000000000..037953ccbc
--- /dev/null
+++ b/ui/message_center/cocoa/settings_controller_unittest.mm
@@ -0,0 +1,80 @@
+// 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 "ui/message_center/cocoa/settings_controller.h"
+
+#include "base/stl_util.h"
+#include "base/strings/utf_string_conversions.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
+#include "ui/message_center/fake_notifier_settings_provider.h"
+
+@implementation MCSettingsController (TestingInterface)
+- (NSUInteger)scrollViewItemCount {
+ return [[[[self scrollView] documentView] subviews] count];
+}
+
+- (NSButton*)bottomMostButton {
+ // The checkboxes are created bottom-to-top, so the first object is the
+ // bottom-most.
+ return [[[[self scrollView] documentView] subviews] objectAtIndex:0];
+}
+@end
+
+namespace message_center {
+
+using ui::CocoaTest;
+
+namespace {
+
+Notifier* NewNotifier(const std::string& id,
+ const std::string& title,
+ bool enabled) {
+ return new Notifier(id, base::UTF8ToUTF16(title), enabled);
+}
+
+} // namespace
+
+TEST_F(CocoaTest, Basic) {
+ std::vector<Notifier*> notifiers;
+ notifiers.push_back(NewNotifier("id", "title", /*enabled=*/true));
+ notifiers.push_back(NewNotifier("id2", "other title", /*enabled=*/false));
+
+ FakeNotifierSettingsProvider provider(notifiers);
+
+ scoped_nsobject<MCSettingsController> controller(
+ [[MCSettingsController alloc] initWithProvider:&provider]);
+ [controller view];
+
+ EXPECT_EQ(notifiers.size(), [controller scrollViewItemCount]);
+
+ STLDeleteElements(&notifiers);
+}
+
+TEST_F(CocoaTest, Toggle) {
+ std::vector<Notifier*> notifiers;
+ notifiers.push_back(NewNotifier("id", "title", /*enabled=*/true));
+ notifiers.push_back(NewNotifier("id2", "other title", /*enabled=*/false));
+
+ FakeNotifierSettingsProvider provider(notifiers);
+
+ scoped_nsobject<MCSettingsController> controller(
+ [[MCSettingsController alloc] initWithProvider:&provider]);
+ [controller view];
+
+ NSButton* toggleSecond = [controller bottomMostButton];
+
+ [toggleSecond performClick:nil];
+ EXPECT_TRUE(provider.WasEnabled(*notifiers.back()));
+
+ [toggleSecond performClick:nil];
+ EXPECT_FALSE(provider.WasEnabled(*notifiers.back()));
+
+ EXPECT_EQ(0, provider.closed_called_count());
+ controller.reset();
+ EXPECT_EQ(1, provider.closed_called_count());
+
+ STLDeleteElements(&notifiers);
+}
+
+} // namespace message_center
diff --git a/ui/message_center/cocoa/status_item_view.mm b/ui/message_center/cocoa/status_item_view.mm
index b884ae6dea..4a76d931e8 100644
--- a/ui/message_center/cocoa/status_item_view.mm
+++ b/ui/message_center/cocoa/status_item_view.mm
@@ -12,15 +12,29 @@
namespace {
-// The width of the status bar.
-const CGFloat kStatusItemLength = 45;
+// The width of the status bar item when it's just the icon.
+const CGFloat kStatusItemLength = 26;
-// The amount of space between the edge of the status item and where the icon
-// should start drawing.
-const CGFloat kInset = 6;
+// The amount of space between the left and right edges and the content of the
+// status item.
+const CGFloat kMargin = 5;
+
+// The amount of space between the icon and the unread count number.
+const CGFloat kUnreadCountPadding = 3;
+
+// The lower-left Y coordinate of the unread count number.
+const CGFloat kUnreadCountMinY = 4;
} // namespace
+@interface MCStatusItemView (Private)
+// Whether or not the status item should be drawn highlighted.
+- (BOOL)shouldHighlight;
+
+// Returns an autoreleased, styled string for the unread count.
+- (NSAttributedString*)unreadCountString;
+@end
+
@implementation MCStatusItemView
@synthesize unreadCount = unreadCount_;
@@ -46,6 +60,21 @@ const CGFloat kInset = 6;
- (void)setUnreadCount:(size_t)unreadCount {
unreadCount_ = unreadCount;
+
+ NSRect frame = [self frame];
+ frame.size.width = kStatusItemLength;
+ NSAttributedString* countString = [self unreadCountString];
+ if (countString) {
+ // Get the subpixel bounding rectangle for the string. -size doesn't yield
+ // correct results for pixel-precise drawing, since it doesn't use the
+ // device metrics.
+ NSRect boundingRect =
+ [countString boundingRectWithSize:NSZeroSize
+ options:NSStringDrawingUsesDeviceMetrics];
+ frame.size.width += roundf(NSWidth(boundingRect)) + kMargin;
+ }
+ [self setFrame:frame];
+
[self setNeedsDisplay:YES];
}
@@ -87,7 +116,7 @@ const CGFloat kInset = 6;
NSRect frame = [self bounds];
// Draw the background color.
- BOOL highlight = highlight_ || inMouseEventSequence_;
+ BOOL highlight = [self shouldHighlight];
[statusItem_ drawStatusBarBackgroundInRect:frame
withHighlight:highlight];
@@ -96,7 +125,7 @@ const CGFloat kInset = 6;
NSImage* image = rb.GetNativeImageNamed(
highlight ? IDR_TRAY_ICON_PRESSED : IDR_TRAY_ICON_REGULAR).ToNSImage();
NSSize size = [image size];
- NSRect drawRect = NSMakeRect(kInset,
+ NSRect drawRect = NSMakeRect(kMargin,
floorf((NSHeight(frame) - size.height) / 2),
size.width,
size.height);
@@ -106,31 +135,38 @@ const CGFloat kInset = 6;
fraction:1.0];
// Draw the unread count.
- if (unreadCount_ > 0) {
- NSString* count = nil;
- if (unreadCount_ > 9)
- count = @"9+";
- else
- count = [NSString stringWithFormat:@"%"PRIuS, unreadCount_];
-
- NSColor* fontColor = highlight ? [NSColor whiteColor]
- : [NSColor blackColor];
- NSDictionary* attributes = @{
- NSFontAttributeName: [NSFont fontWithName:@"Helvetica-Bold" size:12],
- NSForegroundColorAttributeName: fontColor,
- };
-
- // Center the string inside the remaining space of the status item.
- NSSize stringSize = [count sizeWithAttributes:attributes];
- NSRect iconSlice, textSlice;
- NSDivideRect(frame, &iconSlice, &textSlice, NSMaxX(drawRect), NSMinXEdge);
+ NSAttributedString* countString = [self unreadCountString];
+ if (countString) {
NSPoint countPoint = NSMakePoint(
- floorf(NSMinX(textSlice) + (NSWidth(textSlice) - stringSize.width) / 2),
- floorf(NSMinY(textSlice) +
- (NSHeight(textSlice) - stringSize.height) / 2));
-
- [count drawAtPoint:countPoint withAttributes:attributes];
+ NSMaxX(drawRect) + kUnreadCountPadding, kUnreadCountMinY);
+ [countString drawAtPoint:countPoint];
}
}
+// Private /////////////////////////////////////////////////////////////////////
+
+- (BOOL)shouldHighlight {
+ return highlight_ || inMouseEventSequence_;
+}
+
+- (NSAttributedString*)unreadCountString {
+ if (unreadCount_ == 0)
+ return nil;
+
+ NSString* count = nil;
+ if (unreadCount_ > 9)
+ count = @"9+";
+ else
+ count = [NSString stringWithFormat:@"%"PRIuS, unreadCount_];
+
+ NSColor* fontColor = [self shouldHighlight] ? [NSColor whiteColor]
+ : [NSColor blackColor];
+ NSDictionary* attributes = @{
+ NSFontAttributeName: [NSFont fontWithName:@"Helvetica-Bold" size:12],
+ NSForegroundColorAttributeName: fontColor,
+ };
+ return [[[NSAttributedString alloc] initWithString:count
+ attributes:attributes] autorelease];
+}
+
@end
diff --git a/ui/message_center/cocoa/status_item_view_unittest.mm b/ui/message_center/cocoa/status_item_view_unittest.mm
index 4e985b9152..e276be1f4e 100644
--- a/ui/message_center/cocoa/status_item_view_unittest.mm
+++ b/ui/message_center/cocoa/status_item_view_unittest.mm
@@ -54,14 +54,32 @@ TEST_F(StatusItemViewTest, Callback) {
}
TEST_F(StatusItemViewTest, UnreadCount) {
+ CGFloat initial_width = NSWidth([view_ frame]);
+
+ CGFloat width = initial_width;
[view_ setUnreadCount:2];
[view_ display];
+ EXPECT_GT(NSWidth([view_ frame]), width);
+ width = NSWidth([view_ frame]);
+
[view_ setUnreadCount:10];
[view_ display];
+ EXPECT_GT(NSWidth([view_ frame]), width);
+ width = NSWidth([view_ frame]);
+
+ CGFloat max_width = width;
+
[view_ setUnreadCount:0];
[view_ display];
+ EXPECT_LT(NSWidth([view_ frame]), width);
+ width = NSWidth([view_ frame]);
+ EXPECT_CGFLOAT_EQ(width, initial_width);
+
[view_ setUnreadCount:1000];
[view_ display];
+ EXPECT_GT(NSWidth([view_ frame]), width);
+ width = NSWidth([view_ frame]);
+ EXPECT_CGFLOAT_EQ(width, max_width);
}
TEST_F(StatusItemViewTest, Highlight) {
diff --git a/ui/message_center/cocoa/tray_controller.h b/ui/message_center/cocoa/tray_controller.h
index 622635a648..62b03fbed2 100644
--- a/ui/message_center/cocoa/tray_controller.h
+++ b/ui/message_center/cocoa/tray_controller.h
@@ -31,8 +31,11 @@ MESSAGE_CENTER_EXPORT
// Designated initializer.
- (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray;
-// Opens the message center tray with the window's upper-left corner at |point|.
-- (void)showTrayAt:(NSPoint)point;
+// Opens the message center tray to either the right or left of the given
+// points, depending on if it will fit on screen. It will try opening to the
+// right first, but if the window does not fit on screen, it will open to the
+// left.
+- (void)showTrayAtRightOf:(NSPoint)rightPoint atLeftOf:(NSPoint)leftPoint;
// Callback from MessageCenterTrayDelegate, used to update the tray content.
- (void)onMessageCenterTrayChanged;
diff --git a/ui/message_center/cocoa/tray_controller.mm b/ui/message_center/cocoa/tray_controller.mm
index 6b78d65723..362c22a39f 100644
--- a/ui/message_center/cocoa/tray_controller.mm
+++ b/ui/message_center/cocoa/tray_controller.mm
@@ -20,6 +20,10 @@
return YES;
}
+- (void)cancelOperation:(id)sender {
+ [self orderOut:self];
+}
+
@end
@implementation MCTrayController
@@ -27,7 +31,8 @@
- (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray {
scoped_nsobject<MCTrayWindow> window(
[[MCTrayWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
- styleMask:NSBorderlessWindowMask
+ styleMask:NSBorderlessWindowMask |
+ NSNonactivatingPanelMask
backing:NSBackingStoreBuffered
defer:NO]);
if ((self = [super initWithWindow:window])) {
@@ -47,27 +52,35 @@
return self;
}
-- (void)showTrayAt:(NSPoint)point {
+- (void)showTrayAtRightOf:(NSPoint)rightPoint atLeftOf:(NSPoint)leftPoint {
+ NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSRect screenFrame = [screen visibleFrame];
+
NSRect frame = [[viewController_ view] frame];
- frame.origin.x = point.x;
- frame.origin.y = point.y - NSHeight(frame);
+
+ if (rightPoint.x + NSWidth(frame) < NSMaxX(screenFrame)) {
+ frame.origin.x = rightPoint.x;
+ frame.origin.y = rightPoint.y - NSHeight(frame);
+ } else {
+ frame.origin.x = leftPoint.x - NSWidth(frame);
+ frame.origin.y = leftPoint.y - NSHeight(frame);
+ }
+
[[self window] setFrame:frame display:YES];
+ [viewController_ scrollToTop];
[self showWindow:nil];
}
- (void)onMessageCenterTrayChanged {
- CGFloat oldHeight = NSHeight([[viewController_ view] frame]);
[viewController_ onMessageCenterTrayChanged];
- CGFloat newHeight = NSHeight([[viewController_ view] frame]);
-
- NSRect windowFrame = [[self window] frame];
- CGFloat delta = newHeight - oldHeight;
- windowFrame.origin.y -= delta;
- windowFrame.size.height += delta;
- [[self window] setFrame:windowFrame display:YES];
}
- (void)windowDidResignKey:(NSNotification*)notification {
+ // The settings bubble data structures assume that the settings dialog is
+ // visible only for short periods of time: There's a fixed list of permissions
+ // for example.
+ [viewController_ hideSettings:self];
+
tray_->HideMessageCenterBubble();
}
diff --git a/ui/message_center/cocoa/tray_controller_unittest.mm b/ui/message_center/cocoa/tray_controller_unittest.mm
new file mode 100644
index 0000000000..a857bf4eb6
--- /dev/null
+++ b/ui/message_center/cocoa/tray_controller_unittest.mm
@@ -0,0 +1,59 @@
+// Copyright 2013 The Chromium 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 "ui/message_center/cocoa/tray_controller.h"
+
+#include "base/memory/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_tray.h"
+
+namespace {
+
+class TrayControllerTest : public ui::CocoaTest {
+ public:
+ virtual void SetUp() OVERRIDE {
+ ui::CocoaTest::SetUp();
+ message_center::MessageCenter::Initialize();
+ tray_.reset(new message_center::MessageCenterTray(
+ NULL, message_center::MessageCenter::Get()));
+ controller_.reset(
+ [[MCTrayController alloc] initWithMessageCenterTray:tray_.get()]);
+ }
+
+ virtual void TearDown() OVERRIDE {
+ controller_.reset();
+ tray_.reset();
+ message_center::MessageCenter::Shutdown();
+ ui::CocoaTest::TearDown();
+ }
+
+ protected:
+ scoped_ptr<message_center::MessageCenterTray> tray_;
+ scoped_nsobject<MCTrayController> controller_;
+};
+
+TEST_F(TrayControllerTest, OpenLeftRight) {
+ NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSRect screen_frame = [screen visibleFrame];
+
+ const CGFloat y = NSMaxY(screen_frame);
+
+ // With ample room to the right, it should open to the right.
+ NSPoint right_point = NSMakePoint(0, y);
+ NSPoint left_point = NSMakePoint(NSMaxX(screen_frame), y);
+
+ [controller_ showTrayAtRightOf:right_point atLeftOf:left_point];
+ NSRect window_frame = [[controller_ window] frame];
+ EXPECT_EQ(right_point.x, NSMinX(window_frame));
+
+ // With little room on the right, it should open to the left.
+ right_point = NSMakePoint(NSMaxX(screen_frame) - 10, y);
+ [controller_ showTrayAtRightOf:right_point atLeftOf:left_point];
+ window_frame = [[controller_ window] frame];
+ EXPECT_EQ(left_point.x - NSWidth(window_frame), NSMinX(window_frame));
+}
+
+} // namespace
diff --git a/ui/message_center/cocoa/tray_view_controller.h b/ui/message_center/cocoa/tray_view_controller.h
index 27a5f818e7..a20f3e449d 100644
--- a/ui/message_center/cocoa/tray_view_controller.h
+++ b/ui/message_center/cocoa/tray_view_controller.h
@@ -15,20 +15,29 @@
@class HoverImageButton;
@class MCNotificationController;
+@class MCSettingsController;
namespace message_center {
class MessageCenter;
}
+@class HoverImageButton;
+
// The view controller responsible for the content of the message center tray
// UI. This hosts a scroll view of all the notifications, as well as buttons
// to enter quiet mode and the settings panel.
MESSAGE_CENTER_EXPORT
-@interface MCTrayViewController : NSViewController {
+@interface MCTrayViewController : NSViewController<NSAnimationDelegate> {
@private
// Controller of the notifications, where action messages are forwarded. Weak.
message_center::MessageCenter* messageCenter_;
+ // The back button shown while the settings are open.
+ scoped_nsobject<HoverImageButton> backButton_;
+
+ // The "Notifications" label at the top.
+ scoped_nsobject<NSTextField> title_;
+
// The scroll view that contains all the notifications in its documentView.
scoped_nsobject<NSScrollView> scrollView_;
@@ -44,6 +53,17 @@ MESSAGE_CENTER_EXPORT
// The clear all notifications button. Hidden when there are no notifications.
scoped_nsobject<HoverImageButton> clearAllButton_;
+
+ // Array of MCNotificationController objects pending removal by the user.
+ // The object is owned by the array.
+ scoped_nsobject<NSMutableArray> notificationsPendingRemoval_;
+
+ // Used to animate multiple notifications simultaneously when they're being
+ // removed or repositioned.
+ scoped_nsobject<NSViewAnimation> animation_;
+
+ // The controller of the settings view. Only set while the view is open.
+ scoped_nsobject<MCSettingsController> settingsController_;
}
// Designated initializer.
@@ -61,6 +81,18 @@ MESSAGE_CENTER_EXPORT
// Action for the settings button.
- (void)showSettings:(id)sender;
+// Hides the settings dialog if it's open.
+- (void)hideSettings:(id)sender;
+
+// Scroll to the topmost notification in the tray.
+- (void)scrollToTop;
+
+// Returns the maximum height of the client area of the notifications tray.
++ (CGFloat)maxTrayClientHeight;
+
+// Returns the width of the notifications tray.
++ (CGFloat)trayWidth;
+
@end
// Testing API /////////////////////////////////////////////////////////////////
diff --git a/ui/message_center/cocoa/tray_view_controller.mm b/ui/message_center/cocoa/tray_view_controller.mm
index f631d1b8e8..9cf12103fc 100644
--- a/ui/message_center/cocoa/tray_view_controller.mm
+++ b/ui/message_center/cocoa/tray_view_controller.mm
@@ -6,6 +6,7 @@
#include <cmath>
+#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/time.h"
#include "grit/ui_resources.h"
#include "grit/ui_strings.h"
@@ -14,16 +15,39 @@
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/resource/resource_bundle.h"
#import "ui/message_center/cocoa/notification_controller.h"
+#import "ui/message_center/cocoa/settings_controller.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_style.h"
+const int kBackButtonSize = 16;
+
@interface MCTrayViewController (Private)
// Creates all the views for the control area of the tray.
- (void)layoutControlArea;
+
+// Update both tray view and window by resizing it to fit its content.
+- (void)updateTrayViewAndWindow;
+
+// Remove notifications dismissed by the user. It is done in the following
+// 3 steps.
+- (void)closeNotificationsByUser;
+
+// Step 1: hide all notifications pending removal with fade-out animation.
+- (void)hideNotificationsPendingRemoval;
+
+// Step 2: move up all remaining notfications to take over the available space
+// due to hiding notifications. The scroll view and the window remain unchanged.
+- (void)moveUpRemainingNotifications;
+
+// Step 3: finalize the tray view and window to get rid of the empty space.
+- (void)finalizeTrayViewAndWindow;
@end
namespace {
+// The duration of fade-out and bounds animation.
+const NSTimeInterval kAnimationDuration = 0.2;
+
// The height of the bar at the top of the tray that contains buttons.
const CGFloat kControlAreaHeight = 50;
@@ -43,24 +67,23 @@ const CGFloat kTrayBottomMargin = 75;
if ((self = [super initWithNibName:nil bundle:nil])) {
messageCenter_ = messageCenter;
notifications_.reset([[NSMutableArray alloc] init]);
+ notificationsPendingRemoval_.reset([[NSMutableArray alloc] init]);
}
return self;
}
- (void)loadView {
// Configure the root view as a background-colored box.
- scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:
- NSMakeRect(0, 0,
- message_center::kNotificationWidth +
- 2 * message_center::kMarginBetweenItems,
- kControlAreaHeight)]);
+ scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:NSMakeRect(
+ 0, 0, [MCTrayViewController trayWidth], kControlAreaHeight)]);
[view setBorderType:NSNoBorder];
[view setBoxType:NSBoxCustom];
[view setContentViewMargins:NSZeroSize];
[view setFillColor:gfx::SkColorToCalibratedNSColor(
message_center::kMessageCenterBackgroundColor)];
[view setTitlePosition:NSNoTitle];
- [view setWantsLayer:YES]; // Needed for notification view shadows.
+ // TODO(rsesek): See if this fixes a perf regression.
+ // [view setWantsLayer:YES]; // Needed for notification view shadows.
[self setView:view];
[self layoutControlArea];
@@ -81,6 +104,16 @@ const CGFloat kTrayBottomMargin = 75;
}
- (void)onMessageCenterTrayChanged {
+ if (settingsController_)
+ return [self updateTrayViewAndWindow];
+
+ // When the window is visible, the only update is to remove notifications
+ // dismissed by the user.
+ if ([[[self view] window] isVisible]) {
+ [self closeNotificationsByUser];
+ return;
+ }
+
std::map<std::string, MCNotificationController*> newMap;
scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
@@ -111,6 +144,8 @@ const CGFloat kTrayBottomMargin = 75;
[[scrollView_ documentView] addSubview:[controller view]];
[notifications_ addObject:controller]; // Transfer ownership.
+ messageCenter_->DisplayedNotification((*it)->id());
+
notification = controller.get();
} else {
notification = existing->second;
@@ -136,43 +171,10 @@ const CGFloat kTrayBottomMargin = 75;
[notifications_ removeObject:pair.second];
}
- // Don't add extra padding if the center is empty.
- if (minY == message_center::kMarginBetweenItems)
- minY = 0;
-
- // Resize the scroll view's content.
- NSRect scrollViewFrame = [scrollView_ frame];
- NSRect documentFrame = [[scrollView_ documentView] frame];
- documentFrame.size.width = NSWidth(scrollViewFrame);
- documentFrame.size.height = minY;
- [[scrollView_ documentView] setFrame:documentFrame];
-
// Copy the new map of notifications to replace the old.
notificationsMap_ = newMap;
- // Resize the container view.
- NSRect screenFrame = [[[NSScreen screens] objectAtIndex:0] visibleFrame];
- NSRect frame = [[self view] frame];
- frame.size.height = std::min(NSHeight(screenFrame) - kTrayBottomMargin,
- minY + kControlAreaHeight);
- [[self view] setFrame:frame];
-
- // Resize the scroll view.
- scrollViewFrame.size.height = NSHeight(frame) - kControlAreaHeight;
- [scrollView_ setFrame:scrollViewFrame];
-
- // Hide the clear-all button if there are no notifications. Simply swap the
- // X position of it and the pause button in that case.
- BOOL hidden = modelNotifications.size() == 0;
- if ([clearAllButton_ isHidden] != hidden) {
- [clearAllButton_ setHidden:hidden];
-
- NSRect pauseButtonFrame = [pauseButton_ frame];
- NSRect clearAllButtonFrame = [clearAllButton_ frame];
- std::swap(clearAllButtonFrame.origin.x, pauseButtonFrame.origin.x);
- [pauseButton_ setFrame:pauseButtonFrame];
- [clearAllButton_ setFrame:clearAllButtonFrame];
- }
+ [self updateTrayViewAndWindow];
}
- (void)toggleQuietMode:(id)sender {
@@ -195,7 +197,65 @@ const CGFloat kTrayBottomMargin = 75;
}
- (void)showSettings:(id)sender {
- // TODO(rsesek): Implement settings.
+ if (settingsController_)
+ return [self hideSettings:sender];
+
+ {
+ // ShowNotificationSettingsDialog() returns an object owned by an
+ // autoreleased controller. Use a local autorelease pool to make sure this
+ // controller doesn't outlive self if self destroyed before the runloop
+ // flushes autoreleased objects (for example, in tests).
+ base::mac::ScopedNSAutoreleasePool pool;
+ // This ends up calling message_center::ShowSettings() and will set up the
+ // NotifierSettingsProvider along the way.
+ message_center::NotifierSettingsDelegateMac* delegate =
+ static_cast<message_center::NotifierSettingsDelegateMac*>(
+ messageCenter_->ShowNotificationSettingsDialog([self view]));
+ settingsController_.reset([delegate->cocoa_controller() retain]);
+ }
+
+ [[self view] addSubview:[settingsController_ view]];
+
+ NSRect titleFrame = [title_ frame];
+ titleFrame.origin.x =
+ NSMaxX([backButton_ frame]) + message_center::kMarginBetweenItems / 2;
+ [title_ setFrame:titleFrame];
+ [backButton_ setHidden:NO];
+ [clearAllButton_ setEnabled:NO];
+
+ [[[self view] window] recalculateKeyViewLoop];
+
+ [self updateTrayViewAndWindow];
+}
+
+- (void)hideSettings:(id)sender {
+ [[settingsController_ view] removeFromSuperview];
+ settingsController_.reset();
+
+ NSRect titleFrame = [title_ frame];
+ titleFrame.origin.x = NSMinX([backButton_ frame]);
+ [title_ setFrame:titleFrame];
+ [backButton_ setHidden:YES];
+ [clearAllButton_ setEnabled:YES];
+
+ [[[self view] window] recalculateKeyViewLoop];
+ [self updateTrayViewAndWindow];
+}
+
+- (void)scrollToTop {
+ NSPoint topPoint =
+ NSMakePoint(0.0, [[scrollView_ documentView] bounds].size.height);
+ [[scrollView_ documentView] scrollPoint:topPoint];
+}
+
++ (CGFloat)maxTrayClientHeight {
+ NSRect screenFrame = [[[NSScreen screens] objectAtIndex:0] visibleFrame];
+ return NSHeight(screenFrame) - kTrayBottomMargin - kControlAreaHeight;
+}
+
++ (CGFloat)trayWidth {
+ return message_center::kNotificationWidth +
+ 2 * message_center::kMarginBetweenItems;
}
// Testing API /////////////////////////////////////////////////////////////////
@@ -215,30 +275,57 @@ const CGFloat kTrayBottomMargin = 75;
// Private /////////////////////////////////////////////////////////////////////
- (void)layoutControlArea {
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
NSView* view = [self view];
// Create the "Notifications" label at the top of the tray.
NSFont* font = [NSFont labelFontOfSize:message_center::kTitleFontSize];
- scoped_nsobject<NSTextField> title(
- [[NSTextField alloc] initWithFrame:NSZeroRect]);
- [title setAutoresizingMask:NSViewMinYMargin];
- [title setBezeled:NO];
- [title setBordered:NO];
- [title setDrawsBackground:NO];
- [title setEditable:NO];
- [title setFont:font];
- [title setSelectable:NO];
- [title setStringValue:
+ title_.reset([[NSTextField alloc] initWithFrame:NSZeroRect]);
+ [title_ setAutoresizingMask:NSViewMinYMargin];
+ [title_ setBezeled:NO];
+ [title_ setBordered:NO];
+ [title_ setDrawsBackground:NO];
+ [title_ setEditable:NO];
+ [title_ setFont:font];
+ [title_ setSelectable:NO];
+ [title_ setStringValue:
l10n_util::GetNSString(IDS_MESSAGE_CENTER_FOOTER_TITLE)];
- [title setTextColor:gfx::SkColorToCalibratedNSColor(
+ [title_ setTextColor:gfx::SkColorToCalibratedNSColor(
message_center::kFooterTextColor)];
- [title sizeToFit];
+ [title_ sizeToFit];
- NSRect titleFrame = [title frame];
+ NSRect titleFrame = [title_ frame];
titleFrame.origin.x = message_center::kMarginBetweenItems;
titleFrame.origin.y = kControlAreaHeight/2 - NSMidY(titleFrame);
- [title setFrame:titleFrame];
- [view addSubview:title];
+ [title_ setFrame:titleFrame];
+ [view addSubview:title_];
+
+ auto configureButton = ^(HoverImageButton* button) {
+ [[button cell] setHighlightsBy:NSOnState];
+ [button setTrackingEnabled:YES];
+ [button setBordered:NO];
+ [button setAutoresizingMask:NSViewMinYMargin];
+ [button setTarget:self];
+ };
+
+ // Back button. On top of the "Notifications" label, hidden by default.
+ NSRect backButtonFrame =
+ NSMakeRect(NSMinX(titleFrame),
+ (kControlAreaHeight - kBackButtonSize) / 2,
+ kBackButtonSize,
+ kBackButtonSize);
+ backButton_.reset([[HoverImageButton alloc] initWithFrame:backButtonFrame]);
+ [backButton_ setDefaultImage:
+ rb.GetNativeImageNamed(IDR_NOTIFICATION_ARROW).ToNSImage()];
+ [backButton_ setHoverImage:
+ rb.GetNativeImageNamed(IDR_NOTIFICATION_ARROW_HOVER).ToNSImage()];
+ [backButton_ setPressedImage:
+ rb.GetNativeImageNamed(IDR_NOTIFICATION_ARROW_PRESSED).ToNSImage()];
+ [backButton_ setAction:@selector(hideSettings:)];
+ configureButton(backButton_);
+ [backButton_ setHidden:YES];
+ [backButton_ setKeyEquivalent:@"\e"];
+ [[self view] addSubview:backButton_];
// Create the divider line between the control area and the notifications.
scoped_nsobject<NSBox> divider(
@@ -261,16 +348,7 @@ const CGFloat kTrayBottomMargin = 75;
size.height);
};
- auto configureButton = ^(HoverImageButton* button) {
- [[button cell] setHighlightsBy:NSOnState];
- [button setTrackingEnabled:YES];
- [button setBordered:NO];
- [button setAutoresizingMask:NSViewMinYMargin];
- [button setTarget:self];
- };
-
// Create the settings button at the far-right.
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
NSImage* defaultImage =
rb.GetNativeImageNamed(IDR_NOTIFICATION_SETTINGS).ToNSImage();
NSRect settingsButtonFrame = getButtonFrame(
@@ -325,4 +403,162 @@ const CGFloat kTrayBottomMargin = 75;
[view addSubview:pauseButton_];
}
+- (void)updateTrayViewAndWindow {
+ CGFloat scrollContentHeight = 0;
+ if ([notifications_ count]) {
+ scrollContentHeight = NSMaxY([[[notifications_ lastObject] view] frame]) +
+ message_center::kMarginBetweenItems;;
+ }
+
+ // Resize the scroll view's content.
+ NSRect scrollViewFrame = [scrollView_ frame];
+ NSRect documentFrame = [[scrollView_ documentView] frame];
+ documentFrame.size.width = NSWidth(scrollViewFrame);
+ documentFrame.size.height = scrollContentHeight;
+ [[scrollView_ documentView] setFrame:documentFrame];
+
+ // Resize the container view.
+ NSRect frame = [[self view] frame];
+ CGFloat oldHeight = NSHeight(frame);
+ if (settingsController_) {
+ frame.size.height = NSHeight([[settingsController_ view] frame]);
+ } else {
+ frame.size.height = std::min([MCTrayViewController maxTrayClientHeight],
+ scrollContentHeight);
+ }
+ frame.size.height += kControlAreaHeight;
+ CGFloat newHeight = NSHeight(frame);
+ [[self view] setFrame:frame];
+
+ // Resize the scroll view.
+ scrollViewFrame.size.height = NSHeight(frame) - kControlAreaHeight;
+ [scrollView_ setFrame:scrollViewFrame];
+
+ // Resize the window.
+ NSRect windowFrame = [[[self view] window] frame];
+ CGFloat delta = newHeight - oldHeight;
+ windowFrame.origin.y -= delta;
+ windowFrame.size.height += delta;
+
+ [[[self view] window] setFrame:windowFrame display:YES];
+ // Hide the clear-all button if there are no notifications. Simply swap the
+ // X position of it and the pause button in that case.
+ BOOL hidden = ![notifications_ count];
+ if ([clearAllButton_ isHidden] != hidden) {
+ [clearAllButton_ setHidden:hidden];
+
+ NSRect pauseButtonFrame = [pauseButton_ frame];
+ NSRect clearAllButtonFrame = [clearAllButton_ frame];
+ std::swap(clearAllButtonFrame.origin.x, pauseButtonFrame.origin.x);
+ [pauseButton_ setFrame:pauseButtonFrame];
+ [clearAllButton_ setFrame:clearAllButtonFrame];
+ }
+}
+
+- (void)animationDidEnd:(NSAnimation*)animation {
+ if ([notificationsPendingRemoval_ count])
+ [self moveUpRemainingNotifications];
+ else
+ [self finalizeTrayViewAndWindow];
+}
+
+- (void)closeNotificationsByUser {
+ if ([animation_ isAnimating])
+ return;
+ [self hideNotificationsPendingRemoval];
+}
+
+- (void)hideNotificationsPendingRemoval {
+ scoped_nsobject<NSMutableArray> animationDataArray(
+ [[NSMutableArray alloc] init]);
+
+ // Fade-out those notifications pending removal.
+ for (MCNotificationController* notification in notifications_.get()) {
+ if (messageCenter_->HasNotification([notification notificationID]))
+ continue;
+ [notificationsPendingRemoval_ addObject:notification];
+ [animationDataArray addObject:@{
+ NSViewAnimationTargetKey : [notification view],
+ NSViewAnimationEffectKey : NSViewAnimationFadeOutEffect
+ }];
+ }
+
+ if ([notificationsPendingRemoval_ count] == 0)
+ return;
+
+ for (MCNotificationController* notification in
+ notificationsPendingRemoval_.get()) {
+ [notifications_ removeObject:notification];
+ }
+
+ // Start the animation.
+ animation_.reset([[NSViewAnimation alloc]
+ initWithViewAnimations:animationDataArray]);
+ [animation_ setDuration:kAnimationDuration];
+ [animation_ setDelegate:self];
+ [animation_ startAnimation];
+}
+
+- (void)moveUpRemainingNotifications {
+ scoped_nsobject<NSMutableArray> animationDataArray(
+ [[NSMutableArray alloc] init]);
+
+ // Compute the position where the remaining notifications should start.
+ CGFloat minY = message_center::kMarginBetweenItems;
+ for (MCNotificationController* notification in
+ notificationsPendingRemoval_.get()) {
+ NSView* view = [notification view];
+ minY += NSHeight([view frame]) + message_center::kMarginBetweenItems;
+ }
+
+ // Reposition the remaining notifications starting at the computed position.
+ for (MCNotificationController* notification in notifications_.get()) {
+ NSView* view = [notification view];
+ NSRect frame = [view frame];
+ NSRect oldFrame = frame;
+ frame.origin.y = minY;
+ if (!NSEqualRects(oldFrame, frame)) {
+ [animationDataArray addObject:@{
+ NSViewAnimationTargetKey : view,
+ NSViewAnimationEndFrameKey : [NSValue valueWithRect:frame]
+ }];
+ }
+ minY = NSMaxY(frame) + message_center::kMarginBetweenItems;
+ }
+
+ // Now remove notifications pending removal.
+ for (MCNotificationController* notification in
+ notificationsPendingRemoval_.get()) {
+ [[notification view] removeFromSuperview];
+ notificationsMap_.erase([notification notificationID]);
+ }
+ [notificationsPendingRemoval_ removeAllObjects];
+
+ // Start the animation.
+ animation_.reset([[NSViewAnimation alloc]
+ initWithViewAnimations:animationDataArray]);
+ [animation_ setDuration:kAnimationDuration];
+ [animation_ setDelegate:self];
+ [animation_ startAnimation];
+}
+
+- (void)finalizeTrayViewAndWindow {
+ // Reposition the remaining notifications starting at the bottom.
+ CGFloat minY = message_center::kMarginBetweenItems;
+ for (MCNotificationController* notification in notifications_.get()) {
+ NSView* view = [notification view];
+ NSRect frame = [view frame];
+ NSRect oldFrame = frame;
+ frame.origin.y = minY;
+ if (!NSEqualRects(oldFrame, frame))
+ [view setFrame:frame];
+ minY = NSMaxY(frame) + message_center::kMarginBetweenItems;
+ }
+
+ [self updateTrayViewAndWindow];
+
+ // Check if there're more notifications pending removal.
+ [self closeNotificationsByUser];
+}
+
@end
diff --git a/ui/message_center/cocoa/tray_view_controller_unittest.mm b/ui/message_center/cocoa/tray_view_controller_unittest.mm
index c32be80f8e..0ff114dd4d 100644
--- a/ui/message_center/cocoa/tray_view_controller_unittest.mm
+++ b/ui/message_center/cocoa/tray_view_controller_unittest.mm
@@ -5,11 +5,14 @@
#import "ui/message_center/cocoa/tray_view_controller.h"
#include "base/memory/scoped_nsobject.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
+#include "ui/message_center/fake_notifier_settings_provider.h"
#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_impl.h"
#include "ui/message_center/message_center_style.h"
#include "ui/message_center/notification.h"
+#include "ui/message_center/notifier_settings.h"
class TrayViewControllerTest : public ui::CocoaTest {
public:
@@ -17,6 +20,7 @@ class TrayViewControllerTest : public ui::CocoaTest {
ui::CocoaTest::SetUp();
message_center::MessageCenter::Initialize();
center_ = message_center::MessageCenter::Get();
+ center_->DisableTimersForTest();
tray_.reset([[MCTrayViewController alloc] initWithMessageCenter:center_]);
[tray_ view]; // Create the view.
}
@@ -36,14 +40,18 @@ class TrayViewControllerTest : public ui::CocoaTest {
TEST_F(TrayViewControllerTest, AddRemoveOne) {
NSScrollView* view = [[tray_ scrollView] documentView];
EXPECT_EQ(0u, [[view subviews] count]);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("First notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification_data;
+ notification_data.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("First notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification_data.Pass());
[tray_ onMessageCenterTrayChanged];
ASSERT_EQ(1u, [[view subviews] count]);
@@ -66,30 +74,40 @@ TEST_F(TrayViewControllerTest, AddRemoveOne) {
TEST_F(TrayViewControllerTest, AddThreeClearAll) {
NSScrollView* view = [[tray_ scrollView] documentView];
EXPECT_EQ(0u, [[view subviews] count]);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("First notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "2",
- ASCIIToUTF16("Second notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "3",
- ASCIIToUTF16("Third notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("First notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "2",
+ ASCIIToUTF16("Second notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "3",
+ ASCIIToUTF16("Third notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
[tray_ onMessageCenterTrayChanged];
ASSERT_EQ(3u, [[view subviews] count]);
@@ -110,14 +128,18 @@ TEST_F(TrayViewControllerTest, NoClearAllWhenNoNotifications) {
NSMinX([[tray_ pauseButton] frame]));
// Add a notification.
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "1",
- ASCIIToUTF16("First notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "1",
+ ASCIIToUTF16("First notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
[tray_ onMessageCenterTrayChanged];
// Clear all should now be visible.
@@ -126,14 +148,17 @@ TEST_F(TrayViewControllerTest, NoClearAllWhenNoNotifications) {
NSMinX([[tray_ pauseButton] frame]));
// Adding a second notification should keep things still visible.
- center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "2",
- ASCIIToUTF16("Second notification"),
- ASCIIToUTF16("This is a simple test."),
- string16(),
- std::string(),
- NULL,
- NULL);
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
+ "2",
+ ASCIIToUTF16("Second notification"),
+ ASCIIToUTF16("This is a simple test."),
+ gfx::Image(),
+ string16(),
+ std::string(),
+ NULL,
+ NULL));
+ center_->AddNotification(notification.Pass());
[tray_ onMessageCenterTrayChanged];
EXPECT_FALSE([[tray_ clearAllButton] isHidden]);
EXPECT_GT(NSMinX([[tray_ clearAllButton] frame]),
@@ -148,3 +173,63 @@ TEST_F(TrayViewControllerTest, NoClearAllWhenNoNotifications) {
EXPECT_LT(NSMinX([[tray_ clearAllButton] frame]),
NSMinX([[tray_ pauseButton] frame]));
}
+
+namespace message_center {
+
+namespace {
+
+class FakeDelegate : public MessageCenter::Delegate {
+ public:
+ FakeDelegate(NotifierSettingsProvider* provider) : provider_(provider) {}
+
+ virtual NotifierSettingsDelegate* ShowSettingsDialog(
+ gfx::NativeView context) OVERRIDE {
+ return message_center::ShowSettings(provider_, context);
+ }
+
+ virtual void DisableExtension(const std::string& notification_id) OVERRIDE {}
+ virtual void DisableNotificationsFromSource(
+ const std::string& notification_id) OVERRIDE {}
+ virtual void ShowSettings(const std::string& notification_id) OVERRIDE {}
+
+
+
+ NotifierSettingsProvider* provider_;
+};
+
+Notifier* NewNotifier(const std::string& id,
+ const std::string& title,
+ bool enabled) {
+ return new Notifier(id, base::UTF8ToUTF16(title), enabled);
+}
+
+} // namespace
+
+
+TEST_F(TrayViewControllerTest, Settings) {
+ std::vector<Notifier*> notifiers;
+ notifiers.push_back(NewNotifier("id", "title", /*enabled=*/true));
+ notifiers.push_back(NewNotifier("id2", "other title", /*enabled=*/false));
+
+ FakeNotifierSettingsProvider provider(notifiers);
+ FakeDelegate delegate(&provider);
+
+ center_->SetDelegate(&delegate);
+
+ CGFloat trayHeight = NSHeight([[tray_ view] frame]);
+ EXPECT_EQ(0, provider.closed_called_count());
+
+ [tray_ showSettings:nil];
+
+ // There are 0 notifications, but 2 notifiers. The settings pane should be
+ // higher than the empty tray bubble.
+ EXPECT_LT(trayHeight, NSHeight([[tray_ view] frame]));
+
+ [tray_ hideSettings:nil];
+ EXPECT_EQ(1, provider.closed_called_count());
+
+ // The tray should be back at its previous height now.
+ EXPECT_EQ(trayHeight, NSHeight([[tray_ view] frame]));
+}
+
+} // namespace message_center
diff --git a/ui/message_center/fake_message_center.cc b/ui/message_center/fake_message_center.cc
index b48961c4c2..81875499aa 100644
--- a/ui/message_center/fake_message_center.cc
+++ b/ui/message_center/fake_message_center.cc
@@ -55,23 +55,12 @@ NotificationList::PopupNotifications
return NotificationList::PopupNotifications();
}
-void FakeMessageCenter::AddNotification(
- NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {}
+void FakeMessageCenter::AddNotification(scoped_ptr<Notification> notification) {
+}
void FakeMessageCenter::UpdateNotification(
const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {}
+ scoped_ptr<Notification> new_notification) {}
void FakeMessageCenter::RemoveNotification(const std::string& id,
bool by_user) {
@@ -103,8 +92,9 @@ void FakeMessageCenter::DisableNotificationsByUrl(const std::string& id) {
void FakeMessageCenter::ShowNotificationSettings(const std::string& id) {
}
-void FakeMessageCenter::ShowNotificationSettingsDialog(
+NotifierSettingsDelegate* FakeMessageCenter::ShowNotificationSettingsDialog(
gfx::NativeView context) {
+ return NULL;
}
void FakeMessageCenter::ExpandNotification(const std::string& id) {
@@ -134,4 +124,14 @@ void FakeMessageCenter::EnterQuietModeWithExpire(
void FakeMessageCenter::SetMessageCenterVisible(bool visible) {
}
+bool FakeMessageCenter::IsMessageCenterVisible() {
+ return false;
+}
+
+void FakeMessageCenter::RestartPopupTimers() {}
+
+void FakeMessageCenter::PausePopupTimers() {}
+
+void FakeMessageCenter::DisableTimersForTest() {}
+
} // namespace message_center
diff --git a/ui/message_center/fake_message_center.h b/ui/message_center/fake_message_center.h
index 65ddc4bbd1..19ced60c2e 100644
--- a/ui/message_center/fake_message_center.h
+++ b/ui/message_center/fake_message_center.h
@@ -29,20 +29,11 @@ class FakeMessageCenter : public MessageCenter {
virtual bool HasClickedListener(const std::string& id) OVERRIDE;
virtual const NotificationList::Notifications& GetNotifications() OVERRIDE;
virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
- virtual void AddNotification(NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) OVERRIDE;
+ virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
virtual void UpdateNotification(const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) OVERRIDE;
+ scoped_ptr<Notification> new_notification)
+ OVERRIDE;
+
virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
virtual void SetNotificationIcon(const std::string& notification_id,
@@ -57,7 +48,8 @@ class FakeMessageCenter : public MessageCenter {
virtual void DisableNotificationsByExtension(const std::string& id) OVERRIDE;
virtual void DisableNotificationsByUrl(const std::string& id) OVERRIDE;
virtual void ShowNotificationSettings(const std::string& id) OVERRIDE;
- virtual void ShowNotificationSettingsDialog(gfx::NativeView context) OVERRIDE;
+ virtual NotifierSettingsDelegate* ShowNotificationSettingsDialog(
+ gfx::NativeView context) OVERRIDE;
virtual void ExpandNotification(const std::string& id) OVERRIDE;
virtual void ClickOnNotification(const std::string& id) OVERRIDE;
virtual void ClickOnNotificationButton(const std::string& id,
@@ -69,6 +61,12 @@ class FakeMessageCenter : public MessageCenter {
virtual void EnterQuietModeWithExpire(
const base::TimeDelta& expires_in) OVERRIDE;
virtual void SetMessageCenterVisible(bool visible) OVERRIDE;
+ virtual bool IsMessageCenterVisible() OVERRIDE;
+ virtual void RestartPopupTimers() OVERRIDE;
+ virtual void PausePopupTimers() OVERRIDE;
+
+ protected:
+ virtual void DisableTimersForTest() OVERRIDE;
private:
const NotificationList::Notifications empty_notifications_;
diff --git a/ui/message_center/fake_notifier_settings_provider.cc b/ui/message_center/fake_notifier_settings_provider.cc
new file mode 100644
index 0000000000..20493a217a
--- /dev/null
+++ b/ui/message_center/fake_notifier_settings_provider.cc
@@ -0,0 +1,39 @@
+// 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 "ui/message_center/fake_notifier_settings_provider.h"
+
+namespace message_center {
+
+FakeNotifierSettingsProvider::FakeNotifierSettingsProvider(
+ const std::vector<Notifier*>& notifiers)
+ : notifiers_(notifiers), closed_called_count_(0) {}
+
+FakeNotifierSettingsProvider::~FakeNotifierSettingsProvider() {}
+
+void FakeNotifierSettingsProvider::GetNotifierList(
+ std::vector<Notifier*>* notifiers) {
+ notifiers->clear();
+ for (size_t i = 0; i < notifiers_.size(); ++i)
+ notifiers->push_back(notifiers_[i]);
+}
+
+void FakeNotifierSettingsProvider::SetNotifierEnabled(const Notifier& notifier,
+ bool enabled) {
+ enabled_[&notifier] = enabled;
+}
+
+void FakeNotifierSettingsProvider::OnNotifierSettingsClosing() {
+ closed_called_count_++;
+}
+
+bool FakeNotifierSettingsProvider::WasEnabled(const Notifier& notifier) {
+ return enabled_[&notifier];
+}
+
+int FakeNotifierSettingsProvider::closed_called_count() {
+ return closed_called_count_;
+}
+
+} // namespace message_center
diff --git a/ui/message_center/fake_notifier_settings_provider.h b/ui/message_center/fake_notifier_settings_provider.h
new file mode 100644
index 0000000000..6ce8baab0e
--- /dev/null
+++ b/ui/message_center/fake_notifier_settings_provider.h
@@ -0,0 +1,37 @@
+// 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 UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_
+#define UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_
+
+#include "ui/message_center/notifier_settings.h"
+
+namespace message_center {
+
+// A NotifierSettingsProvider that returns a configurable, fixed set of
+// notifiers and records which callbacks were called. For use in tests.
+class FakeNotifierSettingsProvider : public NotifierSettingsProvider {
+ public:
+ FakeNotifierSettingsProvider(const std::vector<Notifier*>& notifiers);
+ ~FakeNotifierSettingsProvider();
+
+ virtual void GetNotifierList(std::vector<Notifier*>* notifiers) OVERRIDE;
+
+ virtual void SetNotifierEnabled(const Notifier& notifier,
+ bool enabled) OVERRIDE;
+
+ virtual void OnNotifierSettingsClosing() OVERRIDE;
+
+ bool WasEnabled(const Notifier& notifier);
+ int closed_called_count();
+
+ private:
+ std::vector<Notifier*> notifiers_;
+ std::map<const Notifier*, bool> enabled_;
+ int closed_called_count_;
+};
+
+} // namespace message_center
+
+#endif // UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_
diff --git a/ui/message_center/message_center.gyp b/ui/message_center/message_center.gyp
index 7e9652fe42..ee469d27e6 100644
--- a/ui/message_center/message_center.gyp
+++ b/ui/message_center/message_center.gyp
@@ -14,8 +14,8 @@
'../../base/base.gyp:base',
'../../base/base.gyp:base_i18n',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../skia/skia.gyp:skia',
+ '../../url/url.gyp:url_lib',
'../base/strings/ui_strings.gyp:ui_strings',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
@@ -30,6 +30,8 @@
'cocoa/popup_collection.mm',
'cocoa/popup_controller.h',
'cocoa/popup_controller.mm',
+ 'cocoa/settings_controller.h',
+ 'cocoa/settings_controller.mm',
'cocoa/status_item_view.h',
'cocoa/status_item_view.mm',
'cocoa/tray_controller.h',
@@ -138,11 +140,16 @@
'cocoa/notification_controller_unittest.mm',
'cocoa/popup_collection_unittest.mm',
'cocoa/popup_controller_unittest.mm',
+ 'cocoa/settings_controller_unittest.mm',
'cocoa/status_item_view_unittest.mm',
+ 'cocoa/tray_controller_unittest.mm',
'cocoa/tray_view_controller_unittest.mm',
'message_center_tray_unittest.cc',
+ 'message_center_impl_unittest.cc',
'fake_message_center.h',
'fake_message_center.cc',
+ 'fake_notifier_settings_provider.h',
+ 'fake_notifier_settings_provider.cc',
'notification_list_unittest.cc',
'test/run_all_unittests.cc',
],
@@ -157,7 +164,6 @@
# Compositor is needed by message_center_view_unittest.cc
# and for the fonts used by bounded_label_unittest.cc.
'../compositor/compositor.gyp:compositor',
- '../compositor/compositor.gyp:compositor_test_support',
'../views/views.gyp:views',
'../views/views.gyp:views_test_support',
],
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h
index 7be6cc8188..df1e3c5550 100644
--- a/ui/message_center/message_center.h
+++ b/ui/message_center/message_center.h
@@ -14,6 +14,8 @@
#include "ui/message_center/notification_list.h"
#include "ui/message_center/notification_types.h"
+class TrayViewControllerTest;
+
namespace base {
class DictionaryValue;
}
@@ -29,6 +31,7 @@ namespace message_center {
class MessageCenterObserver;
class NotificationList;
+class NotifierSettingsDelegate;
class MESSAGE_CENTER_EXPORT MessageCenter {
public:
@@ -57,8 +60,13 @@ class MESSAGE_CENTER_EXPORT MessageCenter {
virtual void ShowSettings(const std::string& notification_id) = 0;
// Request to show the notification settings dialog. |context| is necessary
- // to create a new window.
- virtual void ShowSettingsDialog(gfx::NativeView context) = 0;
+ // to create a new window. Returns the NotifierSettingsDelegate belonging to
+ // the settings dialog. On platforms where the dialog is a standalone
+ // window, this is owned by the window and valid while the window is open.
+ // On platforms where the settings dialog is shown in the tray, this is
+ // owned by the tray and valid while the tray is showing settings.
+ virtual NotifierSettingsDelegate* ShowSettingsDialog(
+ gfx::NativeView context) = 0;
};
// Called to set the delegate. Generally called only once, except in tests.
@@ -80,36 +88,18 @@ class MESSAGE_CENTER_EXPORT MessageCenter {
// Getters of the current notifications.
virtual const NotificationList::Notifications& GetNotifications() = 0;
+ // Gets all notifications being shown as popups.
virtual NotificationList::PopupNotifications GetPopupNotifications() = 0;
// Basic operations of notification: add/remove/update.
- // Adds a new notification. |id| is a unique identifier, used to update or
- // remove notifications. |title| and |meesage| describe the notification text.
- // Use SetNotificationIcon, SetNotificationImage, or SetNotificationButtonIcon
- // to set images. If |extension_id| is provided then 'Disable extension' will
- // appear in a dropdown menu and the id will be used to disable notifications
- // from the extension. Otherwise if |display_source| is provided, a menu item
- // showing the source and allowing notifications from that source to be
- // disabled will be shown. All actual disabling is handled by the Delegate.
- virtual void AddNotification(NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) = 0;
+ // Adds a new notification.
+ virtual void AddNotification(scoped_ptr<Notification> notification) = 0;
// Updates an existing notification with id = old_id and set its id to new_id.
- // |delegate| and |optional_fields| can be NULL in case of no updates on
- // those fields.
- virtual void UpdateNotification(const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) = 0;
+ virtual void UpdateNotification(
+ const std::string& old_id,
+ scoped_ptr<Notification> new_notification) = 0;
// Removes an existing notification.
virtual void RemoveNotification(const std::string& id, bool by_user) = 0;
@@ -131,25 +121,75 @@ class MESSAGE_CENTER_EXPORT MessageCenter {
// Operations happening especially from GUIs: click, expand, disable,
// and settings.
- // TODO(mukai): settings can be in another class?
+ // Searches through the notifications and disables any that match the
+ // extension id given.
virtual void DisableNotificationsByExtension(const std::string& id) = 0;
- virtual void DisableNotificationsByUrl(const std::string& id) = 0;
+
+ // Disables all notifications that match the given url by querying the
+ // delegate and also by matching display_source.
+ // TODO(dewittj): Is display_source matching necessary?
+ virtual void DisableNotificationsByUrl(const std::string& url) = 0;
+
+ // TODO(mukai): settings can be in another class?
+ // Shows the settings for a web notification (profile is identified by the
+ // given notification id).
virtual void ShowNotificationSettings(const std::string& id) = 0;
- virtual void ShowNotificationSettingsDialog(gfx::NativeView context) = 0;
+
+ // Shows the rich notification settings dialog.
+ virtual NotifierSettingsDelegate* ShowNotificationSettingsDialog(
+ gfx::NativeView context) = 0;
+
+ // Reformat a notification to show its entire text content.
virtual void ExpandNotification(const std::string& id) = 0;
+
+ // This should be called by UI classes when a notification is clicked to
+ // trigger the notification's delegate callback and also update the message
+ // center observers.
virtual void ClickOnNotification(const std::string& id) = 0;
+
+ // This should be called by UI classes when a notification button is clicked
+ // to trigger the notification's delegate callback and also update the message
+ // center observers.
virtual void ClickOnNotificationButton(const std::string& id,
int button_index) = 0;
+
+ // This should be called by UI classes after a visible notification popup
+ // closes, indicating that the notification has been shown to the user.
+ // |mark_notification_as_read|, if false, will unset the read bit on a
+ // notification, increasing the unread count of the center.
virtual void MarkSinglePopupAsShown(const std::string& id,
bool mark_notification_as_read) = 0;
+
+ // This should be called by UI classes when a notification is first displayed
+ // to the user, in order to decrement the unread_count for the tray, and to
+ // notify observers that the notification is visible.
virtual void DisplayedNotification(const std::string& id) = 0;
+
+ // This can be called to change the quiet mode state (without a timeout).
virtual void SetQuietMode(bool in_quiet_mode) = 0;
+
+ // Temporarily enables quiet mode for |expires_in| time.
virtual void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) = 0;
+
// Informs the notification list whether the message center is visible.
// This affects whether or not a message has been "read".
virtual void SetMessageCenterVisible(bool visible) = 0;
+ // Allows querying the visibility of the center.
+ virtual bool IsMessageCenterVisible() = 0;
+
+ // UI classes should call this when there is cause to leave popups visible for
+ // longer than the default (for example, when the mouse hovers over a popup).
+ virtual void PausePopupTimers() = 0;
+
+ // UI classes should call this when the popup timers should restart (for
+ // example, after the mouse leaves the popup.)
+ virtual void RestartPopupTimers() = 0;
+
protected:
+ friend class ::TrayViewControllerTest;
+ virtual void DisableTimersForTest() = 0;
+
MessageCenter();
virtual ~MessageCenter();
diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc
index 58aebbbfd3..1202e14090 100644
--- a/ui/message_center/message_center_impl.cc
+++ b/ui/message_center/message_center_impl.cc
@@ -5,14 +5,194 @@
#include "ui/message_center/message_center_impl.h"
#include "base/observer_list.h"
-#include "ui/message_center/message_center_observer.h"
+#include "ui/message_center/message_center_style.h"
#include "ui/message_center/notification.h"
#include "ui/message_center/notification_list.h"
+#include "ui/message_center/notification_types.h"
+
+namespace {
+
+base::TimeDelta GetTimeoutForPriority(int priority) {
+ if (priority > message_center::DEFAULT_PRIORITY) {
+ return base::TimeDelta::FromSeconds(
+ message_center::kAutocloseHighPriorityDelaySeconds);
+ }
+ return base::TimeDelta::FromSeconds(
+ message_center::kAutocloseDefaultDelaySeconds);
+}
+
+} // namespace
namespace message_center {
+namespace internal {
+
+////////////////////////////////////////////////////////////////////////////////
+// PopupTimer
+
+PopupTimer::PopupTimer(const std::string& id,
+ base::TimeDelta timeout,
+ base::WeakPtr<PopupTimersController> controller)
+ : id_(id),
+ timeout_(timeout),
+ timer_controller_(controller),
+ timer_(new base::OneShotTimer<PopupTimersController>) {}
+
+PopupTimer::~PopupTimer() {
+ if (!timer_)
+ return;
+
+ if (timer_->IsRunning())
+ timer_->Stop();
+}
+
+void PopupTimer::Start() {
+ if (timer_->IsRunning())
+ return;
+ base::TimeDelta timeout_to_close =
+ timeout_ <= passed_ ? base::TimeDelta() : timeout_ - passed_;
+ start_time_ = base::Time::Now();
+ timer_->Start(
+ FROM_HERE,
+ timeout_to_close,
+ base::Bind(
+ &PopupTimersController::TimerFinished, timer_controller_, id_));
+}
+
+void PopupTimer::Pause() {
+ if (!timer_.get() || !timer_->IsRunning())
+ return;
+
+ timer_->Stop();
+ passed_ += base::Time::Now() - start_time_;
+}
+
+void PopupTimer::Reset() {
+ if (timer_)
+ timer_->Stop();
+ passed_ = base::TimeDelta();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// PopupTimersController
+
+PopupTimersController::PopupTimersController(MessageCenter* message_center)
+ : message_center_(message_center), popup_deleter_(&popup_timers_) {
+ message_center_->AddObserver(this);
+}
+
+PopupTimersController::~PopupTimersController() {
+ message_center_->RemoveObserver(this);
+}
+
+void PopupTimersController::StartTimer(const std::string& id,
+ const base::TimeDelta& timeout) {
+ PopupTimerCollection::iterator iter = popup_timers_.find(id);
+ if (iter != popup_timers_.end()) {
+ DCHECK(iter->second);
+ iter->second->Start();
+ return;
+ }
+
+ PopupTimer* timer = new PopupTimer(id, timeout, AsWeakPtr());
+
+ timer->Start();
+ popup_timers_[id] = timer;
+}
+
+void PopupTimersController::StartAll() {
+ std::map<std::string, PopupTimer*>::iterator iter;
+ for (iter = popup_timers_.begin(); iter != popup_timers_.end(); iter++) {
+ iter->second->Start();
+ }
+}
+
+void PopupTimersController::ResetTimer(const std::string& id,
+ const base::TimeDelta& timeout) {
+ CancelTimer(id);
+ StartTimer(id, timeout);
+}
+
+void PopupTimersController::PauseTimer(const std::string& id) {
+ PopupTimerCollection::iterator iter = popup_timers_.find(id);
+ if (iter == popup_timers_.end())
+ return;
+ iter->second->Pause();
+}
+
+void PopupTimersController::PauseAll() {
+ std::map<std::string, PopupTimer*>::iterator iter;
+ for (iter = popup_timers_.begin(); iter != popup_timers_.end(); iter++) {
+ iter->second->Pause();
+ }
+}
+
+void PopupTimersController::CancelTimer(const std::string& id) {
+ PopupTimerCollection::iterator iter = popup_timers_.find(id);
+ if (iter == popup_timers_.end())
+ return;
+
+ PopupTimer* timer = iter->second;
+ delete timer;
+
+ popup_timers_.erase(iter);
+}
+
+void PopupTimersController::CancelAll() {
+ STLDeleteValues(&popup_timers_);
+ popup_timers_.clear();
+}
+
+void PopupTimersController::TimerFinished(const std::string& id) {
+ PopupTimerCollection::iterator iter = popup_timers_.find(id);
+ if (iter == popup_timers_.end())
+ return;
+
+ CancelTimer(id);
+ message_center_->MarkSinglePopupAsShown(id, false);
+}
+
+void PopupTimersController::OnNotificationDisplayed(const std::string& id) {
+ OnNotificationUpdated(id);
+}
+
+void PopupTimersController::OnNotificationUpdated(const std::string& id) {
+ NotificationList::PopupNotifications popup_notifications =
+ message_center_->GetPopupNotifications();
+
+ if (!popup_notifications.size()) {
+ CancelAll();
+ return;
+ }
+
+ NotificationList::PopupNotifications::const_iterator iter =
+ popup_notifications.begin();
+ for (; iter != popup_notifications.end(); iter++) {
+ if ((*iter)->id() == id)
+ break;
+ }
+
+ if (iter == popup_notifications.end() || (*iter)->never_timeout()) {
+ CancelTimer(id);
+ return;
+ }
+
+ ResetTimer(id, GetTimeoutForPriority((*iter)->priority()));
+}
+
+void PopupTimersController::OnNotificationRemoved(const std::string& id,
+ bool by_user) {
+ CancelTimer(id);
+}
+
+} // namespace internal
+
+////////////////////////////////////////////////////////////////////////////////
+// MessageCenterImpl
+
MessageCenterImpl::MessageCenterImpl()
: MessageCenter(),
+ popup_timers_controller_(new internal::PopupTimersController(this)),
delegate_(NULL) {
notification_list_.reset(new NotificationList());
}
@@ -37,12 +217,22 @@ void MessageCenterImpl::SetMessageCenterVisible(bool visible) {
std::set<std::string> updated_ids;
notification_list_->SetMessageCenterVisible(visible, &updated_ids);
for (std::set<std::string>::const_iterator iter = updated_ids.begin();
- iter != updated_ids.end(); ++iter) {
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
- OnNotificationUpdated(*iter));
+ iter != updated_ids.end();
+ ++iter) {
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationUpdated(*iter));
+ }
+
+ if (!visible) {
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationCenterClosed());
}
}
+bool MessageCenterImpl::IsMessageCenterVisible() {
+ return notification_list_->is_message_center_visible();
+}
+
size_t MessageCenterImpl::NotificationCount() const {
return notification_list_->NotificationCount();
}
@@ -80,49 +270,34 @@ NotificationList::PopupNotifications
//------------------------------------------------------------------------------
// Client code interface.
+void MessageCenterImpl::AddNotification(scoped_ptr<Notification> notification) {
+ DCHECK(notification.get());
-void MessageCenterImpl::AddNotification(
- NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {
// Sometimes the notification can be added with the same id and the
// |notification_list| will replace the notification instead of adding new.
// This is essentially an update rather than addition.
+ const std::string& id = notification->id();
bool already_exists = notification_list_->HasNotification(id);
- notification_list_->AddNotification(type,
- id,
- title,
- message,
- display_source,
- extension_id,
- optional_fields,
- delegate);
+ notification_list_->AddNotification(notification.Pass());
+
if (already_exists) {
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
- OnNotificationUpdated(id));
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationUpdated(id));
} else {
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
- OnNotificationAdded(id));
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationAdded(id));
}
}
void MessageCenterImpl::UpdateNotification(
const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {
- notification_list_->UpdateNotificationMessage(
- old_id, new_id, title, message, optional_fields, delegate);
+ scoped_ptr<Notification> new_notification) {
+ std::string new_id = new_notification->id();
+ notification_list_->UpdateNotificationMessage(old_id,
+ new_notification.Pass());
if (old_id == new_id) {
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
- OnNotificationUpdated(new_id));
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationUpdated(new_id));
} else {
FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
OnNotificationRemoved(old_id, false));
@@ -141,7 +316,8 @@ void MessageCenterImpl::RemoveNotification(const std::string& id,
// copies the id explicitly here.
std::string copied_id(id);
notification_list_->RemoveNotification(copied_id);
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
+ FOR_EACH_OBSERVER(MessageCenterObserver,
+ observer_list_,
OnNotificationRemoved(copied_id, by_user));
}
@@ -157,7 +333,8 @@ void MessageCenterImpl::RemoveAllNotifications(bool by_user) {
for (std::set<std::string>::const_iterator iter = ids.begin();
iter != ids.end(); ++iter) {
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
+ FOR_EACH_OBSERVER(MessageCenterObserver,
+ observer_list_,
OnNotificationRemoved(*iter, by_user));
}
}
@@ -224,10 +401,11 @@ void MessageCenterImpl::ShowNotificationSettings(const std::string& id) {
delegate_->ShowSettings(id);
}
-void MessageCenterImpl::ShowNotificationSettingsDialog(
+NotifierSettingsDelegate* MessageCenterImpl::ShowNotificationSettingsDialog(
gfx::NativeView context) {
if (delegate_)
- delegate_->ShowSettingsDialog(context);
+ return delegate_->ShowSettingsDialog(context);
+ return NULL;
}
void MessageCenterImpl::ExpandNotification(const std::string& id) {
@@ -271,8 +449,8 @@ void MessageCenterImpl::MarkSinglePopupAsShown(const std::string& id,
if (!HasNotification(id))
return;
notification_list_->MarkSinglePopupAsShown(id, mark_notification_as_read);
- FOR_EACH_OBSERVER(MessageCenterObserver, observer_list_,
- OnNotificationUpdated(id));
+ FOR_EACH_OBSERVER(
+ MessageCenterObserver, observer_list_, OnNotificationUpdated(id));
}
void MessageCenterImpl::DisplayedNotification(const std::string& id) {
@@ -298,4 +476,18 @@ void MessageCenterImpl::EnterQuietModeWithExpire(
notification_list_->EnterQuietModeWithExpire(expires_in);
}
+void MessageCenterImpl::RestartPopupTimers() {
+ if (popup_timers_controller_.get())
+ popup_timers_controller_->StartAll();
+}
+
+void MessageCenterImpl::PausePopupTimers() {
+ if (popup_timers_controller_.get())
+ popup_timers_controller_->PauseAll();
+}
+
+void MessageCenterImpl::DisableTimersForTest() {
+ popup_timers_controller_.reset();
+}
+
} // namespace message_center
diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h
index 33e7a146d7..340062b8be 100644
--- a/ui/message_center/message_center_impl.h
+++ b/ui/message_center/message_center_impl.h
@@ -7,11 +7,126 @@
#include <string>
+#include "base/memory/weak_ptr.h"
+#include "base/stl_util.h"
+#include "base/time.h"
+#include "base/timer.h"
#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_observer.h"
namespace message_center {
-
class NotificationDelegate;
+class MessageCenterImpl;
+
+namespace internal {
+class PopupTimersController;
+
+// A class that manages timeout behavior for notification popups. One instance
+// is created per notification popup.
+class PopupTimer {
+ public:
+ // Accepts a notification ID, time until callback, and a reference to the
+ // controller which will be called back. The reference is a weak pointer so
+ // that timers never cause a callback on a destructed object.
+ PopupTimer(const std::string& id,
+ base::TimeDelta timeout,
+ base::WeakPtr<PopupTimersController> controller);
+ ~PopupTimer();
+
+ // Starts running the timer. Barring a Pause or Reset call, the timer will
+ // call back to |controller| after |timeout| seconds.
+ void Start();
+
+ // Stops the timer, and retains the amount of time that has passed so that on
+ // subsequent calls to Start the timer will continue where it left off.
+ void Pause();
+
+ // Stops the timer, and resets the amount of time that has passed so that
+ // calling Start results in a timeout equal to the initial timeout setting.
+ void Reset();
+
+ base::TimeDelta get_timeout() const { return timeout_; }
+
+ private:
+ // Notification ID for which this timer applies.
+ const std::string id_;
+
+ // Total time that should pass while active before calling TimerFinished.
+ base::TimeDelta timeout_;
+
+ // If paused, the amount of time that passed before pause.
+ base::TimeDelta passed_;
+
+ // The time that the timer was last started.
+ base::Time start_time_;
+
+ // Callback recipient.
+ base::WeakPtr<PopupTimersController> timer_controller_;
+
+ // The actual timer.
+ scoped_ptr<base::OneShotTimer<PopupTimersController> > timer_;
+
+ DISALLOW_COPY_AND_ASSIGN(PopupTimer);
+};
+
+// A class that manages all the timers running for individual notification popup
+// windows. It supports weak pointers in order to allow safe callbacks when
+// timers expire.
+class MESSAGE_CENTER_EXPORT PopupTimersController
+ : public base::SupportsWeakPtr<PopupTimersController>,
+ public MessageCenterObserver {
+ public:
+ explicit PopupTimersController(MessageCenter* message_center);
+ virtual ~PopupTimersController();
+
+ // MessageCenterObserver implementation.
+ virtual void OnNotificationDisplayed(const std::string& id) OVERRIDE;
+ virtual void OnNotificationUpdated(const std::string& id) OVERRIDE;
+ virtual void OnNotificationRemoved(const std::string& id, bool by_user)
+ OVERRIDE;
+
+ // Callback for each timer when its time is up.
+ virtual void TimerFinished(const std::string& id);
+
+ // Pauses all running timers.
+ void PauseAll();
+
+ // Continues all managed timers.
+ void StartAll();
+
+ // Removes all managed timers.
+ void CancelAll();
+
+ // Starts a timer (by creating a PopupTimer) for |id|.
+ void StartTimer(const std::string& id,
+ const base::TimeDelta& timeout_in_seconds);
+
+ // Stops a single timer, reverts it to a new timeout, and restarts it.
+ void ResetTimer(const std::string& id,
+ const base::TimeDelta& timeout_in_seconds);
+
+ // Pauses a single timer, such that it will continue where it left off after a
+ // call to StartAll or StartTimer.
+ void PauseTimer(const std::string& id);
+
+ // Removes and cancels a single popup timer, if it exists.
+ void CancelTimer(const std::string& id);
+
+ private:
+ // Weak, this class is owned by MessageCenterImpl.
+ MessageCenter* message_center_;
+
+ // The PopupTimerCollection contains all the managed timers by their ID. They
+ // are owned by this class, and deleted by |popup_deleter_| on destructon or
+ // when explicitly cancelled.
+ typedef std::map<std::string, PopupTimer*> PopupTimerCollection;
+ PopupTimerCollection popup_timers_;
+ STLValueDeleter<PopupTimerCollection> popup_deleter_;
+
+ DISALLOW_COPY_AND_ASSIGN(PopupTimersController);
+};
+
+} // namespace internal
// The default implementation of MessageCenter.
class MessageCenterImpl : public MessageCenter {
@@ -24,6 +139,7 @@ class MessageCenterImpl : public MessageCenter {
virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE;
virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE;
virtual void SetMessageCenterVisible(bool visible) OVERRIDE;
+ virtual bool IsMessageCenterVisible() OVERRIDE;
virtual size_t NotificationCount() const OVERRIDE;
virtual size_t UnreadNotificationCount() const OVERRIDE;
virtual bool HasPopupNotifications() const OVERRIDE;
@@ -32,20 +148,10 @@ class MessageCenterImpl : public MessageCenter {
virtual bool HasClickedListener(const std::string& id) OVERRIDE;
virtual const NotificationList::Notifications& GetNotifications() OVERRIDE;
virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
- virtual void AddNotification(NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) OVERRIDE;
+ virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
virtual void UpdateNotification(const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) OVERRIDE;
+ scoped_ptr<Notification> new_notification)
+ OVERRIDE;
virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
virtual void SetNotificationIcon(const std::string& notification_id,
@@ -58,7 +164,8 @@ class MessageCenterImpl : public MessageCenter {
virtual void DisableNotificationsByExtension(const std::string& id) OVERRIDE;
virtual void DisableNotificationsByUrl(const std::string& id) OVERRIDE;
virtual void ShowNotificationSettings(const std::string& id) OVERRIDE;
- virtual void ShowNotificationSettingsDialog(gfx::NativeView context) OVERRIDE;
+ virtual NotifierSettingsDelegate* ShowNotificationSettingsDialog(
+ gfx::NativeView context) OVERRIDE;
virtual void ExpandNotification(const std::string& id) OVERRIDE;
virtual void ClickOnNotification(const std::string& id) OVERRIDE;
virtual void ClickOnNotificationButton(const std::string& id,
@@ -69,10 +176,16 @@ class MessageCenterImpl : public MessageCenter {
virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE;
virtual void EnterQuietModeWithExpire(
const base::TimeDelta& expires_in) OVERRIDE;
+ virtual void RestartPopupTimers() OVERRIDE;
+ virtual void PausePopupTimers() OVERRIDE;
+
+ protected:
+ virtual void DisableTimersForTest() OVERRIDE;
private:
scoped_ptr<NotificationList> notification_list_;
ObserverList<MessageCenterObserver> observer_list_;
+ scoped_ptr<internal::PopupTimersController> popup_timers_controller_;
Delegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl);
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
new file mode 100644
index 0000000000..3217b05f94
--- /dev/null
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -0,0 +1,210 @@
+// Copyright 2013 The Chromium Authors. 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/message_center/message_center_impl.h"
+
+#include "base/bind.h"
+#include "base/message_loop.h"
+#include "base/run_loop.h"
+#include "base/utf_string_conversions.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/notification_types.h"
+
+namespace message_center {
+namespace {
+
+class MessageCenterImplTest : public testing::Test,
+ public MessageCenterObserver {
+ public:
+ MessageCenterImplTest() {}
+
+ virtual void SetUp() OVERRIDE {
+ MessageCenter::Initialize();
+ message_center_ = MessageCenter::Get();
+ loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_DEFAULT));
+ run_loop_.reset(new base::RunLoop());
+ closure_ = run_loop_->QuitClosure();
+ }
+
+ virtual void TearDown() OVERRIDE {
+ run_loop_.reset();
+ loop_.reset();
+ message_center_ = NULL;
+ MessageCenter::Shutdown();
+ }
+
+ MessageCenter* message_center() const { return message_center_; }
+ base::RunLoop* run_loop() const { return run_loop_.get(); }
+ base::Closure closure() const { return closure_; }
+
+ private:
+ MessageCenter* message_center_;
+ scoped_ptr<base::MessageLoop> loop_;
+ scoped_ptr<base::RunLoop> run_loop_;
+ base::Closure closure_;
+
+ DISALLOW_COPY_AND_ASSIGN(MessageCenterImplTest);
+};
+
+} // namespace
+
+namespace internal {
+
+class MockPopupTimersController : public PopupTimersController {
+ public:
+ MockPopupTimersController(MessageCenter* message_center,
+ base::Closure quit_closure)
+ : PopupTimersController(message_center),
+ timer_finished_(false),
+ quit_closure_(quit_closure) {}
+ virtual ~MockPopupTimersController() {}
+
+ virtual void TimerFinished(const std::string& id) OVERRIDE {
+ LOG(INFO) << "In timer finished for id " << id;
+ base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_);
+ timer_finished_ = true;
+ last_id_ = id;
+ }
+
+ bool timer_finished() const { return timer_finished_; }
+ const std::string& last_id() const { return last_id_; }
+
+ private:
+ bool timer_finished_;
+ std::string last_id_;
+ base::Closure quit_closure_;
+};
+
+TEST_F(MessageCenterImplTest, PopupTimersEmptyController) {
+ scoped_ptr<PopupTimersController> popup_timers_controller =
+ make_scoped_ptr(new PopupTimersController(message_center()));
+
+ // Test that all functions succed without any timers created.
+ popup_timers_controller->PauseAll();
+ popup_timers_controller->StartAll();
+ popup_timers_controller->CancelAll();
+ popup_timers_controller->TimerFinished("unknown");
+ popup_timers_controller->PauseTimer("unknown");
+ popup_timers_controller->CancelTimer("unknown");
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerStartTimer) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(1));
+ run_loop()->Run();
+ EXPECT_TRUE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerPauseTimer) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->PauseTimer("test");
+ run_loop()->RunUntilIdle();
+
+ EXPECT_FALSE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerCancelTimer) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->CancelTimer("test");
+ run_loop()->RunUntilIdle();
+
+ EXPECT_FALSE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerPauseAllTimers) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->PauseAll();
+ run_loop()->RunUntilIdle();
+
+ EXPECT_FALSE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerStartAllTimers) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->PauseAll();
+ popup_timers_controller->StartAll();
+ run_loop()->Run();
+
+ EXPECT_TRUE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerStartMultipleTimers) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(5));
+ popup_timers_controller->StartTimer("test2",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->StartTimer("test3",
+ base::TimeDelta::FromMilliseconds(3));
+ popup_timers_controller->PauseAll();
+ popup_timers_controller->StartAll();
+ run_loop()->Run();
+
+ EXPECT_EQ(popup_timers_controller->last_id(), "test2");
+ EXPECT_TRUE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerStartMultipleTimersPause) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(5));
+ popup_timers_controller->StartTimer("test2",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->StartTimer("test3",
+ base::TimeDelta::FromMilliseconds(3));
+ popup_timers_controller->PauseTimer("test2");
+
+ run_loop()->Run();
+
+ EXPECT_EQ(popup_timers_controller->last_id(), "test3");
+ EXPECT_TRUE(popup_timers_controller->timer_finished());
+}
+
+TEST_F(MessageCenterImplTest, PopupTimersControllerResetTimer) {
+ scoped_ptr<MockPopupTimersController> popup_timers_controller =
+ make_scoped_ptr(
+ new MockPopupTimersController(message_center(), closure()));
+ popup_timers_controller->StartTimer("test",
+ base::TimeDelta::FromMilliseconds(5));
+ popup_timers_controller->StartTimer("test2",
+ base::TimeDelta::FromMilliseconds(1));
+ popup_timers_controller->StartTimer("test3",
+ base::TimeDelta::FromMilliseconds(3));
+ popup_timers_controller->PauseTimer("test2");
+ popup_timers_controller->ResetTimer("test",
+ base::TimeDelta::FromMilliseconds(2));
+
+ run_loop()->Run();
+
+ EXPECT_EQ(popup_timers_controller->last_id(), "test");
+ EXPECT_TRUE(popup_timers_controller->timer_finished());
+}
+
+} // namespace internal
+
+} // namespace message_center
diff --git a/ui/message_center/message_center_observer.h b/ui/message_center/message_center_observer.h
index 61a339077b..8a52792731 100644
--- a/ui/message_center/message_center_observer.h
+++ b/ui/message_center/message_center_observer.h
@@ -41,6 +41,10 @@ class MESSAGE_CENTER_EXPORT MessageCenterObserver {
// Called when the notification associated with |notification_id| is actually
// displayed.
virtual void OnNotificationDisplayed(const std::string& notification_id) {}
+
+ // Called when the notification list is no longer being displayed as a
+ // notification center.
+ virtual void OnNotificationCenterClosed() {}
};
} // namespace message_center
diff --git a/ui/message_center/message_center_style.h b/ui/message_center/message_center_style.h
index b54a6246a4..f0ca839d1e 100644
--- a/ui/message_center/message_center_style.h
+++ b/ui/message_center/message_center_style.h
@@ -64,8 +64,16 @@ const int kButtonHeight = 38; // In DIPs.
const int kButtonHorizontalPadding = 16; // In DIPs.
const int kButtonIconTopPadding = 11; // In DIPs.
const int kButtonIconToTitlePadding = 16; // In DIPs.
+
+#if !defined(OS_LINUX) || defined(USE_AURA)
const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
+#endif
+
+// Line limits.
+const int kTitleLineLimit = 3;
+const int kMessageCollapsedLineLimit = 3;
+const int kMessageExpandedLineLimit = 7;
// Around notifications ////////////////////////////////////////////////////////
diff --git a/ui/message_center/message_center_tray.cc b/ui/message_center/message_center_tray.cc
index f16e0b4f4c..7ee43aa5ff 100644
--- a/ui/message_center/message_center_tray.cc
+++ b/ui/message_center/message_center_tray.cc
@@ -5,7 +5,7 @@
#include "ui/message_center/message_center_tray.h"
#include "base/observer_list.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/message_center/message_center.h"
diff --git a/ui/message_center/message_center_tray_unittest.cc b/ui/message_center/message_center_tray_unittest.cc
index 1b774f892a..0235fa77bd 100644
--- a/ui/message_center/message_center_tray_unittest.cc
+++ b/ui/message_center/message_center_tray_unittest.cc
@@ -4,7 +4,7 @@
#include "ui/message_center/message_center_tray.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/notification_types.h"
@@ -57,6 +57,19 @@ class MessageCenterTrayTest : public testing::Test {
}
protected:
+ void AddNotification(const std::string& id) {
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id,
+ ASCIIToUTF16("Test Web Notification"),
+ ASCIIToUTF16("Notification message body."),
+ gfx::Image(),
+ ASCIIToUTF16("www.test.org"),
+ "" /* extension id */,
+ NULL /* optional_fields */,
+ NULL /* delegate */));
+ message_center_->AddNotification(notification.Pass());
+ }
scoped_ptr<MockDelegate> delegate_;
scoped_ptr<MessageCenterTray> message_center_tray_;
MessageCenter* message_center_;
@@ -102,14 +115,7 @@ TEST_F(MessageCenterTrayTest, BasicPopup) {
ASSERT_FALSE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
- message_center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "BasicPopup",
- ASCIIToUTF16("Test Web Notification"),
- ASCIIToUTF16("Notification message body."),
- ASCIIToUTF16("www.test.org"),
- "" /* extension id */,
- NULL /* optional_fields */,
- NULL /* delegate */);
+ AddNotification("BasicPopup");
ASSERT_TRUE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
@@ -124,14 +130,7 @@ TEST_F(MessageCenterTrayTest, MessageCenterClosesPopups) {
ASSERT_FALSE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
- message_center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "MessageCenterClosesPopups",
- ASCIIToUTF16("Test Web Notification"),
- ASCIIToUTF16("Notification message body."),
- ASCIIToUTF16("www.test.org"),
- "" /* extension id */,
- NULL /* optional_fields */,
- NULL /* delegate */);
+ AddNotification("MessageCenterClosesPopups");
ASSERT_TRUE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
@@ -142,14 +141,7 @@ TEST_F(MessageCenterTrayTest, MessageCenterClosesPopups) {
ASSERT_FALSE(message_center_tray_->popups_visible());
ASSERT_TRUE(message_center_tray_->message_center_visible());
- message_center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "MessageCenterClosesPopups2",
- ASCIIToUTF16("Test Web Notification"),
- ASCIIToUTF16("Notification message body."),
- ASCIIToUTF16("www.test.org"),
- "" /* extension id */,
- NULL /* optional_fields */,
- NULL /* delegate */);
+ AddNotification("MessageCenterClosesPopups2");
message_center_tray_->ShowPopupBubble();
@@ -170,14 +162,7 @@ TEST_F(MessageCenterTrayTest, ShowBubbleFails) {
ASSERT_FALSE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
- message_center_->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "ShowBubbleFails",
- ASCIIToUTF16("Test Web Notification"),
- ASCIIToUTF16("Notification message body."),
- ASCIIToUTF16("www.test.org"),
- "" /* extension id */,
- NULL /* optional_fields */,
- NULL /* delegate */);
+ AddNotification("ShowBubbleFails");
message_center_tray_->ShowPopupBubble();
diff --git a/ui/message_center/message_center_util.cc b/ui/message_center/message_center_util.cc
index 913cf0d342..ba5027c0c5 100644
--- a/ui/message_center/message_center_util.cc
+++ b/ui/message_center/message_center_util.cc
@@ -13,21 +13,18 @@ namespace message_center {
// when a time period in Canary indicates the new notifications are acceptable
// for default behavior.
bool IsRichNotificationEnabled() {
-#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(USE_ASH)
+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(USE_AURA)
return false;
#endif
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableRichNotifications))
+ switches::kDisableRichNotifications)) {
return false;
+ }
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableRichNotifications))
+ switches::kEnableRichNotifications)) {
return true;
-
-// Not enabled by default on Mac yet.
-#if defined(OS_MACOSX)
- return false;
-#endif
+ }
return true;
}
diff --git a/ui/message_center/message_center_util.h b/ui/message_center/message_center_util.h
index e4b37aab7a..7fc1ad813c 100644
--- a/ui/message_center/message_center_util.h
+++ b/ui/message_center/message_center_util.h
@@ -13,7 +13,7 @@ MESSAGE_CENTER_EXPORT bool IsRichNotificationEnabled();
// If Rich Notificaitons are enabled by default on a platform, run the
// corresponding tests on that platform.
-#if defined(OS_WIN) || defined(USE_ASH)
+#if defined(OS_WIN) || defined(USE_AURA) || defined(OS_MACOSX)
#define RUN_MESSAGE_CENTER_TESTS 1
#endif
diff --git a/ui/message_center/notification.cc b/ui/message_center/notification.cc
index c4db2d50b1..43e3de751d 100644
--- a/ui/message_center/notification.cc
+++ b/ui/message_center/notification.cc
@@ -23,10 +23,27 @@ ButtonInfo::ButtonInfo(const string16& title)
: title(title) {
}
+RichNotificationData::RichNotificationData()
+ : priority(DEFAULT_PRIORITY),
+ never_timeout(false),
+ timestamp(base::Time::Now()) {}
+
+RichNotificationData::RichNotificationData(const RichNotificationData& other)
+ : priority(other.priority),
+ never_timeout(other.never_timeout),
+ timestamp(other.timestamp),
+ expanded_message(other.expanded_message),
+ image(other.image),
+ items(other.items),
+ buttons(other.buttons) {}
+
+RichNotificationData::~RichNotificationData() {}
+
Notification::Notification(NotificationType type,
const std::string& id,
const string16& title,
const string16& message,
+ const gfx::Image& icon,
const string16& display_source,
const std::string& extension_id,
const DictionaryValue* optional_fields,
@@ -35,48 +52,97 @@ Notification::Notification(NotificationType type,
id_(id),
title_(title),
message_(message),
+ icon_(icon),
display_source_(display_source),
extension_id_(extension_id),
- priority_(DEFAULT_PRIORITY),
- timestamp_(base::Time::Now()),
serial_number_(g_next_serial_number_++),
shown_as_popup_(false),
is_read_(false),
is_expanded_(false),
- never_timeout_(false),
delegate_(delegate) {
- // This can override some data members initialized to deafule values above.
+ // This can override some data members initialized to default values above.
ApplyOptionalFields(optional_fields);
}
-Notification::~Notification() {
+Notification::Notification(NotificationType type,
+ const std::string& id,
+ const string16& title,
+ const string16& message,
+ const gfx::Image& icon,
+ const string16& display_source,
+ const std::string& extension_id,
+ const RichNotificationData& optional_fields,
+ NotificationDelegate* delegate)
+ : type_(type),
+ id_(id),
+ title_(title),
+ message_(message),
+ icon_(icon),
+ display_source_(display_source),
+ extension_id_(extension_id),
+ serial_number_(g_next_serial_number_++),
+ optional_fields_(optional_fields),
+ delegate_(delegate) {}
+
+Notification::Notification(const Notification& other)
+ : type_(other.type_),
+ id_(other.id_),
+ title_(other.title_),
+ message_(other.message_),
+ icon_(other.icon_),
+ display_source_(other.display_source_),
+ extension_id_(other.extension_id_),
+ serial_number_(other.serial_number_),
+ optional_fields_(other.optional_fields_),
+ shown_as_popup_(other.shown_as_popup_),
+ is_read_(other.is_read_),
+ is_expanded_(other.is_expanded_),
+ delegate_(other.delegate_) {}
+
+Notification& Notification::operator=(const Notification& other) {
+ type_ = other.type_;
+ id_ = other.id_;
+ title_ = other.title_;
+ message_ = other.message_;
+ icon_ = other.icon_;
+ display_source_ = other.display_source_;
+ extension_id_ = other.extension_id_;
+ serial_number_ = other.serial_number_;
+ optional_fields_ = other.optional_fields_;
+ shown_as_popup_ = other.shown_as_popup_;
+ is_read_ = other.is_read_;
+ is_expanded_ = other.is_expanded_;
+ delegate_ = other.delegate_;
+
+ return *this;
}
+Notification::~Notification() {}
+
void Notification::CopyState(Notification* base) {
shown_as_popup_ = base->shown_as_popup();
is_read_ = base->is_read();
is_expanded_ = base->is_expanded();
- never_timeout_ = base->never_timeout();
if (!delegate_.get())
delegate_ = base->delegate();
+ optional_fields_.never_timeout = base->never_timeout();
}
-bool Notification::SetButtonIcon(size_t index, const gfx::Image& icon) {
- if (index >= buttons_.size())
- return false;
- buttons_[index].icon = icon;
- return true;
+void Notification::SetButtonIcon(size_t index, const gfx::Image& icon) {
+ if (index >= optional_fields_.buttons.size())
+ return;
+ optional_fields_.buttons[index].icon = icon;
}
void Notification::ApplyOptionalFields(const DictionaryValue* fields) {
if (!fields)
return;
- fields->GetInteger(kPriorityKey, &priority_);
+ fields->GetInteger(kPriorityKey, &optional_fields_.priority);
if (fields->HasKey(kTimestampKey)) {
std::string time_string;
fields->GetString(kTimestampKey, &time_string);
- base::Time::FromString(time_string.c_str(), &timestamp_);
+ base::Time::FromString(time_string.c_str(), &optional_fields_.timestamp);
}
if (fields->HasKey(kButtonOneTitleKey) ||
fields->HasKey(kButtonOneIconUrlKey)) {
@@ -84,14 +150,14 @@ void Notification::ApplyOptionalFields(const DictionaryValue* fields) {
string16 icon;
if (fields->GetString(kButtonOneTitleKey, &title) ||
fields->GetString(kButtonOneIconUrlKey, &icon)) {
- buttons_.push_back(ButtonInfo(title));
+ optional_fields_.buttons.push_back(ButtonInfo(title));
if (fields->GetString(kButtonTwoTitleKey, &title) ||
fields->GetString(kButtonTwoIconUrlKey, &icon)) {
- buttons_.push_back(ButtonInfo(title));
+ optional_fields_.buttons.push_back(ButtonInfo(title));
}
}
}
- fields->GetString(kExpandedMessageKey, &expanded_message_);
+ fields->GetString(kExpandedMessageKey, &optional_fields_.expanded_message);
if (fields->HasKey(kItemsKey)) {
const ListValue* items;
CHECK(fields->GetList(kItemsKey, &items));
@@ -102,11 +168,11 @@ void Notification::ApplyOptionalFields(const DictionaryValue* fields) {
items->GetDictionary(i, &item);
item->GetString(kItemTitleKey, &title);
item->GetString(kItemMessageKey, &message);
- items_.push_back(NotificationItem(title, message));
+ optional_fields_.items.push_back(NotificationItem(title, message));
}
}
- fields->GetBoolean(kPrivateNeverTimeoutKey, &never_timeout_);
+ fields->GetBoolean(kPrivateNeverTimeoutKey, &optional_fields_.never_timeout);
}
} // namespace message_center
diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
index 5f7ee12a45..c6c43b9f51 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -32,16 +32,45 @@ struct MESSAGE_CENTER_EXPORT ButtonInfo {
ButtonInfo(const string16& title);
};
+class MESSAGE_CENTER_EXPORT RichNotificationData {
+ public:
+ RichNotificationData();
+ RichNotificationData(const RichNotificationData& other);
+ ~RichNotificationData();
+
+ int priority;
+ bool never_timeout;
+ base::Time timestamp;
+ string16 expanded_message;
+ gfx::Image image;
+ std::vector<NotificationItem> items;
+ std::vector<ButtonInfo> buttons;
+};
+
class MESSAGE_CENTER_EXPORT Notification {
public:
Notification(NotificationType type,
const std::string& id,
const string16& title,
const string16& message,
+ const gfx::Image& icon,
const string16& display_source,
const std::string& extension_id,
const DictionaryValue* optional_fields, // May be NULL.
NotificationDelegate* delegate); // May be NULL.
+
+ Notification(NotificationType type,
+ const std::string& id,
+ const string16& title,
+ const string16& message,
+ const gfx::Image& icon,
+ const string16& display_source,
+ const std::string& extension_id,
+ const RichNotificationData& optional_fields,
+ NotificationDelegate* delegate);
+
+ Notification(const Notification& other);
+ Notification& operator=(const Notification& other);
virtual ~Notification();
// Copies the internal on-memory state from |base|, i.e. shown_as_popup,
@@ -52,26 +81,37 @@ class MESSAGE_CENTER_EXPORT Notification {
const std::string& id() const { return id_; }
const string16& title() const { return title_; }
const string16& message() const { return message_; }
+
+ // A display string for the source of the notification.
const string16& display_source() const { return display_source_; }
const std::string& extension_id() const { return extension_id_; }
+ void set_extension_id(const std::string& extension_id) {
+ extension_id_ = extension_id;
+ }
// Begin unpacked values from optional_fields.
- int priority() const { return priority_; }
- base::Time timestamp() const { return timestamp_; }
- const string16& expanded_message() const { return expanded_message_; }
- const std::vector<NotificationItem>& items() const { return items_; }
+ int priority() const { return optional_fields_.priority; }
+ base::Time timestamp() const { return optional_fields_.timestamp; }
+ const string16& expanded_message() const {
+ return optional_fields_.expanded_message;
+ }
+ const std::vector<NotificationItem>& items() const {
+ return optional_fields_.items;
+ }
// End unpacked values.
// Images fetched asynchronously.
const gfx::Image& icon() const { return icon_; }
void set_icon(const gfx::Image& icon) { icon_ = icon; }
- const gfx::Image& image() const { return image_; }
- void set_image(const gfx::Image& image) { image_ = image; }
+ const gfx::Image& image() const { return optional_fields_.image; }
+ void set_image(const gfx::Image& image) { optional_fields_.image = image; }
// Buttons, with icons fetched asynchronously.
- const std::vector<ButtonInfo>& buttons() const { return buttons_; }
- bool SetButtonIcon(size_t index, const gfx::Image& icon);
+ const std::vector<ButtonInfo>& buttons() const {
+ return optional_fields_.buttons;
+ }
+ void SetButtonIcon(size_t index, const gfx::Image& icon);
bool shown_as_popup() const { return shown_as_popup_; }
void set_shown_as_popup(bool shown_as_popup) {
@@ -90,38 +130,56 @@ class MESSAGE_CENTER_EXPORT Notification {
// The notification with lesser serial_number is considered 'older'.
unsigned serial_number() { return serial_number_; }
- bool never_timeout() const { return never_timeout_; }
- NotificationDelegate* delegate() { return delegate_.get(); }
+ // Marks this explicitly to prevent the timeout dismiss of notification.
+ // This is used by webkit notifications to keep the existing behavior.
+ void set_never_timeout(bool never_timeout) {
+ optional_fields_.never_timeout = never_timeout;
+ }
- private:
- // Unpacks the provided |optional_fields| and applies the values to override
- // the notification's data members.
- void ApplyOptionalFields(const DictionaryValue* optional_fields);
+ bool never_timeout() const { return optional_fields_.never_timeout; }
+ NotificationDelegate* delegate() const { return delegate_.get(); }
+ const RichNotificationData& rich_notification_data() const {
+ return optional_fields_;
+ }
+
+ // Delegate actions.
+ void Display() const { delegate()->Display(); }
+ void Error() const { delegate()->Error(); }
+ bool HasClickedListener() const { return delegate()->HasClickedListener(); }
+ void Click() const { delegate()->Click(); }
+ void ButtonClick(int index) const { delegate()->ButtonClick(index); }
+ void Close(bool by_user) const { delegate()->Close(by_user); }
+ protected:
+ // The type of notification we'd like displayed.
NotificationType type_;
+
std::string id_;
string16 title_;
string16 message_;
+
+ // Image data for the associated icon, used by Ash when available.
+ gfx::Image icon_;
+
+ // The display string for the source of the notification. Could be
+ // the same as origin_url_, or the name of an extension.
string16 display_source_;
+
+ private:
+ // Unpacks the provided |optional_fields| and applies the values to override
+ // the notification's data members.
+ void ApplyOptionalFields(const DictionaryValue* optional_fields);
+
std::string extension_id_;
- int priority_;
- base::Time timestamp_;
unsigned serial_number_;
- string16 expanded_message_;
- std::vector<NotificationItem> items_;
- gfx::Image icon_;
- gfx::Image image_;
- std::vector<ButtonInfo> buttons_;
+ RichNotificationData optional_fields_;
bool shown_as_popup_; // True if this has been shown as a popup.
bool is_read_; // True if this has been seen in the message center.
bool is_expanded_; // True if this has been expanded in the message center.
- bool never_timeout_; // True if it doesn't timeout when it appears as a toast.
// A proxy object that allows access back to the JavaScript object that
// represents the notification, for firing events.
scoped_refptr<NotificationDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(Notification);
};
} // namespace message_center
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc
index 8770ee793c..7b44da7af4 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -71,63 +71,33 @@ void NotificationList::SetMessageCenterVisible(
}
}
-void NotificationList::AddNotification(NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {
- scoped_ptr<Notification> notification(new Notification(type,
- id,
- title,
- message,
- display_source,
- extension_id,
- optional_fields,
- delegate));
+void NotificationList::AddNotification(scoped_ptr<Notification> notification) {
PushNotification(notification.Pass());
}
void NotificationList::UpdateNotificationMessage(
const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate) {
+ scoped_ptr<Notification> new_notification) {
Notifications::iterator iter = GetNotification(old_id);
if (iter == notifications_.end())
return;
- // Copy and update a notification. It has an effect of setting a new timestamp
- // if not overridden by optional_fields
- scoped_ptr<Notification> notification(
- new Notification((*iter)->type(),
- new_id,
- title,
- message,
- (*iter)->display_source(),
- (*iter)->extension_id(),
- optional_fields,
- delegate));
- notification->CopyState(*iter);
+ new_notification->CopyState(*iter);
// Handles priority promotion. If the notification is already dismissed but
// the updated notification has higher priority, it should re-appear as a
// toast.
- if ((*iter)->priority() < notification->priority()) {
- notification->set_is_read(false);
- notification->set_shown_as_popup(false);
+ if ((*iter)->priority() < new_notification->priority()) {
+ new_notification->set_is_read(false);
+ new_notification->set_shown_as_popup(false);
}
// Do not use EraseNotification and PushNotification, since we don't want to
// change unread counts nor to update is_read/shown_as_popup states.
- Notification *old = *iter;
+ Notification* old = *iter;
notifications_.erase(iter);
delete old;
- notifications_.insert(notification.release());
+ notifications_.insert(new_notification.release());
}
void NotificationList::RemoveNotification(const std::string& id) {
@@ -199,7 +169,8 @@ bool NotificationList::SetNotificationButtonIcon(
Notifications::iterator iter = GetNotification(notification_id);
if (iter == notifications_.end())
return false;
- return (*iter)->SetButtonIcon(button_index, image);
+ (*iter)->SetButtonIcon(button_index, image);
+ return true;
}
bool NotificationList::HasNotification(const std::string& id) {
@@ -245,6 +216,17 @@ NotificationList::PopupNotifications NotificationList::GetPopupNotifications() {
return result;
}
+Notification* NotificationList::GetPopup(const std::string& id) {
+ PopupNotifications popups = GetPopupNotifications();
+ for (PopupNotifications::iterator iter = popups.begin(); iter != popups.end();
+ ++iter) {
+ if ((*iter)->id() == id)
+ return *iter;
+ }
+
+ return NULL;
+}
+
void NotificationList::MarkPopupsAsShown(int priority) {
PopupNotifications popups = GetPopupNotifications();
for (PopupNotifications::iterator iter = popups.begin();
diff --git a/ui/message_center/notification_list.h b/ui/message_center/notification_list.h
index 415585376e..d47e99d302 100644
--- a/ui/message_center/notification_list.h
+++ b/ui/message_center/notification_list.h
@@ -58,21 +58,10 @@ class MESSAGE_CENTER_EXPORT NotificationList {
void SetMessageCenterVisible(bool visible,
std::set<std::string>* updated_ids);
- void AddNotification(NotificationType type,
- const std::string& id,
- const string16& title,
- const string16& message,
- const string16& display_source,
- const std::string& extension_id,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate);
+ void AddNotification(scoped_ptr<Notification> notification);
void UpdateNotificationMessage(const std::string& old_id,
- const std::string& new_id,
- const string16& title,
- const string16& message,
- const base::DictionaryValue* optional_fields,
- NotificationDelegate* delegate);
+ scoped_ptr<Notification> new_notification);
void RemoveNotification(const std::string& id);
@@ -105,6 +94,7 @@ class MESSAGE_CENTER_EXPORT NotificationList {
// used to limit the number of notifications for the DEFAULT priority.
// The returned list is sorted by timestamp, newer first.
PopupNotifications GetPopupNotifications();
+ Notification* GetPopup(const std::string& id);
// Marks the popups for the |priority| as shown.
void MarkPopupsAsShown(int priority);
@@ -137,6 +127,7 @@ class MESSAGE_CENTER_EXPORT NotificationList {
const Notifications& GetNotifications();
size_t NotificationCount() const;
size_t unread_count() const { return unread_count_; }
+ bool is_message_center_visible() const { return message_center_visible_; }
private:
friend class test::NotificationListTest;
diff --git a/ui/message_center/notification_list_unittest.cc b/ui/message_center/notification_list_unittest.cc
index 02e3a5d288..c9e7f0ac35 100644
--- a/ui/message_center/notification_list_unittest.cc
+++ b/ui/message_center/notification_list_unittest.cc
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/i18n/time_formatting.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/message_center_style.h"
@@ -32,15 +32,17 @@ class NotificationListTest : public testing::Test {
// notification.
std::string AddNotification(const base::DictionaryValue* optional_fields) {
std::string new_id = base::StringPrintf(kIdFormat, counter_);
- notification_list_->AddNotification(
+ scoped_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE,
new_id,
UTF8ToUTF16(base::StringPrintf(kTitleFormat, counter_)),
UTF8ToUTF16(base::StringPrintf(kMessageFormat, counter_)),
+ gfx::Image(),
UTF8ToUTF16(kDisplaySource),
kExtensionId,
optional_fields,
- NULL);
+ NULL));
+ notification_list_->AddNotification(notification.Pass());
counter_++;
return new_id;
}
@@ -72,13 +74,13 @@ class NotificationListTest : public testing::Test {
NotificationList* notification_list() { return notification_list_.get(); }
- private:
static const char kIdFormat[];
static const char kTitleFormat[];
static const char kMessageFormat[];
static const char kDisplaySource[];
static const char kExtensionId[];
+ private:
scoped_ptr<NotificationList> notification_list_;
size_t counter_;
@@ -164,12 +166,17 @@ TEST_F(NotificationListTest, UpdateNotification) {
std::string id0 = AddNotification(NULL);
std::string replaced = id0 + "_replaced";
EXPECT_EQ(1u, notification_list()->NotificationCount());
- notification_list()->UpdateNotificationMessage(id0,
- replaced,
- UTF8ToUTF16("newtitle"),
- UTF8ToUTF16("newbody"),
- NULL,
- NULL);
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ replaced,
+ UTF8ToUTF16("newtitle"),
+ UTF8ToUTF16("newbody"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ NULL,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id0, notification.Pass());
EXPECT_EQ(1u, notification_list()->NotificationCount());
const NotificationList::Notifications& notifications =
notification_list()->GetNotifications();
@@ -179,38 +186,47 @@ TEST_F(NotificationListTest, UpdateNotification) {
}
TEST_F(NotificationListTest, GetNotificationsBySourceOrExtensions) {
- notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "id0",
- UTF8ToUTF16("title0"),
- UTF8ToUTF16("message0"),
- UTF8ToUTF16("source0"),
- "ext0",
- NULL,
- NULL);
- notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "id1",
- UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"),
- UTF8ToUTF16("source0"),
- "ext0",
- NULL,
- NULL);
- notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "id2",
- UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"),
- UTF8ToUTF16("source1"),
- "ext0",
- NULL,
- NULL);
- notification_list()->AddNotification(message_center::NOTIFICATION_TYPE_SIMPLE,
- "id3",
- UTF8ToUTF16("title1"),
- UTF8ToUTF16("message1"),
- UTF8ToUTF16("source2"),
- "ext1",
- NULL,
- NULL);
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id0",
+ UTF8ToUTF16("title0"),
+ UTF8ToUTF16("message0"),
+ gfx::Image(),
+ UTF8ToUTF16("source0"),
+ "ext0",
+ NULL,
+ NULL));
+ notification_list()->AddNotification(notification.Pass());
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id1",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ gfx::Image(),
+ UTF8ToUTF16("source0"),
+ "ext0",
+ NULL,
+ NULL));
+ notification_list()->AddNotification(notification.Pass());
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id2",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ gfx::Image(),
+ UTF8ToUTF16("source1"),
+ "ext0",
+ NULL,
+ NULL));
+ notification_list()->AddNotification(notification.Pass());
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ "id3",
+ UTF8ToUTF16("title1"),
+ UTF8ToUTF16("message1"),
+ gfx::Image(),
+ UTF8ToUTF16("source2"),
+ "ext1",
+ NULL,
+ NULL));
+ notification_list()->AddNotification(notification.Pass());
NotificationList::Notifications by_source =
notification_list()->GetNotificationsBySource("id0");
@@ -308,12 +324,17 @@ TEST_F(NotificationListTest, PriorityPromotion) {
EXPECT_EQ(0u, GetPopupCounts());
base::DictionaryValue optional;
optional.SetInteger(message_center::kPriorityKey, 1);
- notification_list()->UpdateNotificationMessage(id0,
- replaced,
- UTF8ToUTF16("newtitle"),
- UTF8ToUTF16("newbody"),
- &optional,
- NULL);
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ replaced,
+ UTF8ToUTF16("newtitle"),
+ UTF8ToUTF16("newbody"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ &optional,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id0, notification.Pass());
EXPECT_EQ(1u, notification_list()->NotificationCount());
EXPECT_EQ(1u, GetPopupCounts());
const NotificationList::Notifications& notifications =
@@ -335,31 +356,48 @@ TEST_F(NotificationListTest, PriorityPromotionWithPopups) {
base::DictionaryValue priority_default;
priority_default.SetInteger(message_center::kPriorityKey,
static_cast<int>(DEFAULT_PRIORITY));
- notification_list()->UpdateNotificationMessage(id0,
- id0,
- UTF8ToUTF16("newtitle"),
- UTF8ToUTF16("newbody"),
- &priority_default,
- NULL);
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id0,
+ UTF8ToUTF16("newtitle"),
+ UTF8ToUTF16("newbody"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ &priority_default,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id0, notification.Pass());
EXPECT_EQ(1u, GetPopupCounts());
notification_list()->MarkSinglePopupAsShown(id0, true);
EXPECT_EQ(0u, GetPopupCounts());
// update with no promotion change for id0, it won't appear as a toast.
- notification_list()->UpdateNotificationMessage(
- id0, id0, UTF8ToUTF16("newtitle2"), UTF8ToUTF16("newbody2"), NULL, NULL);
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id0,
+ UTF8ToUTF16("newtitle2"),
+ UTF8ToUTF16("newbody2"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ NULL,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id0, notification.Pass());
EXPECT_EQ(0u, GetPopupCounts());
// id1 promoted to DEFAULT->HIGH, it'll appear as toast (popup).
base::DictionaryValue priority_high;
priority_high.SetInteger(message_center::kPriorityKey,
static_cast<int>(HIGH_PRIORITY));
- notification_list()->UpdateNotificationMessage(id1,
- id1,
- UTF8ToUTF16("newtitle"),
- UTF8ToUTF16("newbody"),
- &priority_high,
- NULL);
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id1,
+ UTF8ToUTF16("newtitle"),
+ UTF8ToUTF16("newbody"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ &priority_high,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id1, notification.Pass());
EXPECT_EQ(1u, GetPopupCounts());
notification_list()->MarkSinglePopupAsShown(id1, true);
EXPECT_EQ(0u, GetPopupCounts());
@@ -368,23 +406,31 @@ TEST_F(NotificationListTest, PriorityPromotionWithPopups) {
base::DictionaryValue priority_max;
priority_max.SetInteger(message_center::kPriorityKey,
static_cast<int>(MAX_PRIORITY));
- notification_list()->UpdateNotificationMessage(id1,
- id1,
- UTF8ToUTF16("newtitle2"),
- UTF8ToUTF16("newbody2"),
- &priority_max,
- NULL);
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id1,
+ UTF8ToUTF16("newtitle2"),
+ UTF8ToUTF16("newbody2"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ &priority_max,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id1, notification.Pass());
EXPECT_EQ(1u, GetPopupCounts());
notification_list()->MarkSinglePopupAsShown(id1, true);
EXPECT_EQ(0u, GetPopupCounts());
// id1 demoted to MAX->DEFAULT, no appearing as toast.
- notification_list()->UpdateNotificationMessage(id1,
- id1,
- UTF8ToUTF16("newtitle3"),
- UTF8ToUTF16("newbody3"),
- &priority_default,
- NULL);
+ notification.reset(new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ id1,
+ UTF8ToUTF16("newtitle3"),
+ UTF8ToUTF16("newbody3"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ &priority_default,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id1, notification.Pass());
EXPECT_EQ(0u, GetPopupCounts());
}
@@ -513,12 +559,17 @@ TEST_F(NotificationListTest, UpdateAfterMarkedAsShown) {
EXPECT_TRUE(n1->is_read());
const std::string replaced("test-replaced-id");
- notification_list()->UpdateNotificationMessage(id1,
- replaced,
- UTF8ToUTF16("newtitle"),
- UTF8ToUTF16("newbody"),
- NULL,
- NULL);
+ scoped_ptr<Notification> notification(
+ new Notification(message_center::NOTIFICATION_TYPE_SIMPLE,
+ replaced,
+ UTF8ToUTF16("newtitle"),
+ UTF8ToUTF16("newbody"),
+ gfx::Image(),
+ UTF8ToUTF16(kDisplaySource),
+ kExtensionId,
+ NULL,
+ NULL));
+ notification_list()->UpdateNotificationMessage(id1, notification.Pass());
n1 = GetNotification(id1);
EXPECT_TRUE(n1 == NULL);
const Notification* nr = GetNotification(replaced);
diff --git a/ui/message_center/notification_types.cc b/ui/message_center/notification_types.cc
index a3919878b8..a54ed7bd32 100644
--- a/ui/message_center/notification_types.cc
+++ b/ui/message_center/notification_types.cc
@@ -6,10 +6,8 @@
namespace message_center {
-const char kMessageIntentKey[] = "message_intent";
const char kPriorityKey[] = "priority";
const char kTimestampKey[] = "timestamp";
-const char kUnreadCountKey[] = "unread_count";
const char kButtonOneTitleKey[] = "button_one_title";
const char kButtonOneIconUrlKey[] = "button_one_icon_url";
const char kButtonTwoTitleKey[] = "button_two_title";
diff --git a/ui/message_center/notification_types.h b/ui/message_center/notification_types.h
index 161fb1490f..c935cfa804 100644
--- a/ui/message_center/notification_types.h
+++ b/ui/message_center/notification_types.h
@@ -15,7 +15,6 @@ namespace message_center {
// Keys for optional fields in Notification.
MESSAGE_CENTER_EXPORT extern const char kPriorityKey[];
MESSAGE_CENTER_EXPORT extern const char kTimestampKey[];
-MESSAGE_CENTER_EXPORT extern const char kUnreadCountKey[];
MESSAGE_CENTER_EXPORT extern const char kButtonOneTitleKey[];
MESSAGE_CENTER_EXPORT extern const char kButtonOneIconUrlKey[];
MESSAGE_CENTER_EXPORT extern const char kButtonTwoTitleKey[];
diff --git a/ui/message_center/notifier_settings.cc b/ui/message_center/notifier_settings.cc
index 9ea84de96c..1548125923 100644
--- a/ui/message_center/notifier_settings.cc
+++ b/ui/message_center/notifier_settings.cc
@@ -6,7 +6,7 @@
namespace message_center {
-#if !defined(TOOLKIT_VIEWS)
+#if !defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
NotifierSettingsDelegate* ShowSettings(NotifierSettingsProvider* provider,
gfx::NativeView context) {
NOTIMPLEMENTED();
diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc
index 0c2e56a39a..03fe7fe427 100644
--- a/ui/message_center/test/run_all_unittests.cc
+++ b/ui/message_center/test/run_all_unittests.cc
@@ -7,7 +7,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor_setup.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/test/test_suite.h"
#include "ui/views/view.h"
@@ -29,17 +28,12 @@ void MessageCenterTestSuite::Initialize() {
ui::test::UITestSuite::Initialize();
#if !defined(OS_MACOSX)
- ui::CompositorTestSupport::Initialize();
ui::SetupTestCompositor();
#endif
}
void MessageCenterTestSuite::Shutdown() {
ui::test::UITestSuite::Shutdown();
-
-#if !defined(OS_MACOSX)
- ui::CompositorTestSupport::Terminate();
-#endif
}
int main(int argc, char** argv) {
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 1c47a13e7c..b333525304 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -7,7 +7,7 @@
#include <limits>
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/text/text_elider.h"
#include "ui/gfx/canvas.h"
#include "ui/views/controls/label.h"
diff --git a/ui/message_center/views/bounded_label_unittest.cc b/ui/message_center/views/bounded_label_unittest.cc
index 78574047ab..d8252a7d53 100644
--- a/ui/message_center/views/bounded_label_unittest.cc
+++ b/ui/message_center/views/bounded_label_unittest.cc
@@ -8,7 +8,7 @@
#include "base/string_util.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/font.h"
#include "ui/views/controls/label.h"
diff --git a/ui/message_center/views/message_center_view.cc b/ui/message_center/views/message_center_view.cc
index cfcd776a67..8e87df5b06 100644
--- a/ui/message_center/views/message_center_view.cc
+++ b/ui/message_center/views/message_center_view.cc
@@ -214,8 +214,6 @@ RichMessageCenterButtonBar::RichMessageCenterButtonBar(
quiet_mode_button_->SetToggledImage(
views::Button::STATE_PRESSED,
resource_bundle.GetImageSkiaNamed(IDR_NOTIFICATION_PAUSE_PRESSED));
- quiet_mode_button_->SetToggledTooltipText(resource_bundle.GetLocalizedString(
- IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOGGLED_TOOLTIP));
quiet_mode_button_->SetToggled(message_center->IsQuietMode());
button_container->AddChildView(quiet_mode_button_);
@@ -312,8 +310,8 @@ BoundedScrollView::BoundedScrollView(int min_height, int max_height)
gfx::Size BoundedScrollView::GetPreferredSize() {
gfx::Size size = contents()->GetPreferredSize();
- size.ClampToMin(gfx::Size(size.width(), min_height_));
- size.ClampToMax(gfx::Size(size.width(), max_height_));
+ size.SetToMax(gfx::Size(size.width(), min_height_));
+ size.SetToMin(gfx::Size(size.width(), max_height_));
gfx::Insets insets = GetInsets();
size.Enlarge(insets.width(), insets.height());
return size;
@@ -379,7 +377,6 @@ int NoNotificationMessageView::GetHeightForWidth(int width) {
}
void NoNotificationMessageView::Layout() {
- DCHECK_EQ(100, height());
int text_height = label_->GetHeightForWidth(width());
int margin = (height() - text_height) / 2;
label_->SetBounds(0, margin, width(), text_height);
diff --git a/ui/message_center/views/message_center_view_unittest.cc b/ui/message_center/views/message_center_view_unittest.cc
index 3a000f59c6..7573acb4ab 100644
--- a/ui/message_center/views/message_center_view_unittest.cc
+++ b/ui/message_center/views/message_center_view_unittest.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/fake_message_center.h"
#include "ui/message_center/notification.h"
@@ -131,6 +131,7 @@ void MessageCenterViewTest::SetUp() {
std::string("notification id"),
UTF8ToUTF16("title"),
UTF8ToUTF16("message"),
+ gfx::Image(),
UTF8ToUTF16("display source"),
std::string("extension id"),
NULL,
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index 4c8b301769..4acafdac75 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -13,6 +13,7 @@
#include "base/run_loop.h"
#include "base/time.h"
#include "base/timer.h"
+#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/gfx/screen.h"
@@ -25,6 +26,7 @@
#include "ui/views/background.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
+#include "ui/views/views_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -90,7 +92,7 @@ void MessagePopupCollection::UpdateWidgets() {
// items may be ignored if there are no room to place them.
for (NotificationList::PopupNotifications::const_reverse_iterator iter =
popups.rbegin(); iter != popups.rend(); ++iter) {
- if (HasToast((*iter)->id()))
+ if (FindToast((*iter)->id()))
continue;
MessageView* view =
@@ -116,6 +118,10 @@ void MessagePopupCollection::UpdateWidgets() {
bottom -= view_height + kToastMargin;
message_center_->DisplayedNotification((*iter)->id());
+ if (views::ViewsDelegate::views_delegate) {
+ views::ViewsDelegate::views_delegate->NotifyAccessibilityEvent(
+ toast, ui::AccessibilityTypes::EVENT_ALERT);
+ }
}
}
@@ -124,9 +130,7 @@ void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) {
// toasts. So we need to keep track of which one is the currently active one.
latest_toast_entered_ = toast_entered;
- for (Toasts::iterator iter = toasts_.begin(); iter != toasts_.end(); ++iter) {
- (*iter)->SuspendTimer();
- }
+ message_center_->PausePopupTimers();
if (user_is_closing_toasts_by_clicking_)
defer_timer_->Stop();
@@ -146,11 +150,7 @@ void MessagePopupCollection::OnMouseExited(ToastContentsView* toast_exited) {
this,
&MessagePopupCollection::OnDeferTimerExpired);
} else {
- for (Toasts::iterator iter = toasts_.begin();
- iter != toasts_.end();
- ++iter) {
- (*iter)->StartTimer();
- }
+ message_center_->RestartPopupTimers();
}
}
@@ -203,32 +203,24 @@ void MessagePopupCollection::RepositionWidgetsWithTarget() {
if (toasts_.empty())
return;
- if (toasts_.back()->origin().y() > target_top_edge_) {
- // No widgets are above, thus slides up the widgets.
- int slide_length =
- toasts_.back()->origin().y() - target_top_edge_;
- for (Toasts::iterator iter = toasts_.begin();
- iter != toasts_.end(); ++iter) {
- gfx::Rect bounds((*iter)->bounds());
- bounds.set_y(bounds.y() - slide_length);
- (*iter)->SetBoundsWithAnimation(bounds);
- }
- } else {
- Toasts::reverse_iterator iter = toasts_.rbegin();
- for (; iter != toasts_.rend(); ++iter) {
- if ((*iter)->origin().y() > target_top_edge_)
- break;
- }
- --iter;
- int slide_length = target_top_edge_ - (*iter)->origin().y();
- for (; ; --iter) {
- gfx::Rect bounds((*iter)->bounds());
- bounds.set_y(bounds.y() + slide_length);
- (*iter)->SetBoundsWithAnimation(bounds);
-
- if (iter == toasts_.rbegin())
- break;
- }
+ // No widgets above.
+ if (toasts_.back()->origin().y() > target_top_edge_)
+ return;
+
+ Toasts::reverse_iterator iter = toasts_.rbegin();
+ for (; iter != toasts_.rend(); ++iter) {
+ if ((*iter)->origin().y() > target_top_edge_)
+ break;
+ }
+ --iter;
+ int slide_length = target_top_edge_ - (*iter)->origin().y();
+ for (; ; --iter) {
+ gfx::Rect bounds((*iter)->bounds());
+ bounds.set_y(bounds.y() + slide_length);
+ (*iter)->SetBoundsWithAnimation(bounds);
+
+ if (iter == toasts_.rbegin())
+ break;
}
}
@@ -271,9 +263,7 @@ void MessagePopupCollection::OnDeferTimerExpired() {
user_is_closing_toasts_by_clicking_ = false;
DecrementDeferCounter();
- for (Toasts::iterator iter = toasts_.begin(); iter != toasts_.end(); ++iter) {
- (*iter)->StartTimer();
- }
+ message_center_->RestartPopupTimers();
}
void MessagePopupCollection::OnNotificationUpdated(
@@ -299,7 +289,6 @@ void MessagePopupCollection::OnNotificationUpdated(
MessageView* view = NotificationView::Create(
*(*iter), message_center_, true);
(*toast_iter)->SetContents(view);
- (*toast_iter)->ResetTimeout((*iter)->priority());
updated = true;
}
@@ -319,12 +308,13 @@ void MessagePopupCollection::SetWorkAreaForTest(const gfx::Rect& work_area) {
work_area_ = work_area;
}
-bool MessagePopupCollection::HasToast(const std::string& notification_id) {
+ToastContentsView* MessagePopupCollection::FindToast(
+ const std::string& notification_id) {
for (Toasts::iterator iter = toasts_.begin(); iter != toasts_.end(); ++iter) {
if ((*iter)->id() == notification_id)
- return true;
+ return *iter;
}
- return false;
+ return NULL;
}
void MessagePopupCollection::IncrementDeferCounter() {
diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h
index e0af09c038..c4a65949b5 100644
--- a/ui/message_center/views/message_popup_collection.h
+++ b/ui/message_center/views/message_popup_collection.h
@@ -109,7 +109,7 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
virtual void OnNotificationUpdated(
const std::string& notification_id) OVERRIDE;
- bool HasToast(const std::string& notification_id);
+ ToastContentsView* FindToast(const std::string& notification_id);
// While the toasts are animated, avoid updating the collection, to reduce
// user confusion. Instead, update the collection when all animations are
diff --git a/ui/message_center/views/message_popup_collection_unittest.cc b/ui/message_center/views/message_popup_collection_unittest.cc
index a032aaf0f6..093c936926 100644
--- a/ui/message_center/views/message_popup_collection_unittest.cc
+++ b/ui/message_center/views/message_popup_collection_unittest.cc
@@ -8,7 +8,7 @@
#include "base/message_loop.h"
#include "base/strings/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
#include "ui/message_center/fake_message_center.h"
@@ -68,14 +68,17 @@ class MessagePopupCollectionTest : public views::ViewsTestBase {
std::string AddNotification() {
std::string id = base::IntToString(id_++);
- MessageCenter::Get()->AddNotification(NOTIFICATION_TYPE_BASE_FORMAT,
- id,
- UTF8ToUTF16("test title"),
- UTF8ToUTF16("test message"),
- string16() /* display_source */,
- "" /* extension_id */,
- NULL /* optional_fields */,
- NULL /* delegate */);
+ scoped_ptr<Notification> notification(
+ new Notification(NOTIFICATION_TYPE_BASE_FORMAT,
+ id,
+ UTF8ToUTF16("test title"),
+ UTF8ToUTF16("test message"),
+ gfx::Image(),
+ string16() /* display_source */,
+ "" /* extension_id */,
+ NULL /* optional_fields */,
+ NULL /* delegate */));
+ MessageCenter::Get()->AddNotification(notification.Pass());
return id;
}
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index e6f52a7805..4f7f26650c 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -42,18 +42,14 @@ const int kItemTitleToMessagePadding = 3;
const int kButtonVecticalPadding = 0;
const int kButtonTitleTopPadding = 0;
-// Line limits.
-const int kTitleLineLimit = 3;
-const int kMessageCollapsedLineLimit = 3;
-const int kMessageExpandedLineLimit = 7;
-
// Character limits: Displayed text will be subject to the line limits above,
// but we also remove trailing characters from text to reduce processing cost.
// Character limit = pixels per line * line limit / min. pixels per character.
const size_t kTitleCharacterLimit =
- message_center::kNotificationWidth * kTitleLineLimit / 4;
+ message_center::kNotificationWidth * message_center::kTitleLineLimit / 4;
const size_t kMessageCharacterLimit =
- message_center::kNotificationWidth * kMessageExpandedLineLimit / 3;
+ message_center::kNotificationWidth *
+ message_center::kMessageExpandedLineLimit / 3;
// Notification colors. The text background colors below are used only to keep
// view::Label from modifying the text color and will not actually be drawn.
@@ -398,7 +394,7 @@ NotificationView::NotificationView(const Notification& notification,
title_view_ = new BoundedLabel(
ui::TruncateString(notification.title(), kTitleCharacterLimit), font);
title_view_->SetLineHeight(kTitleLineHeight);
- title_view_->SetLineLimit(kTitleLineLimit);
+ title_view_->SetLineLimit(message_center::kTitleLineLimit);
title_view_->SetColors(message_center::kRegularTextColor,
kRegularTextBackgroundColor);
title_view_->set_border(MakeTextBorder(padding, 3, 0));
@@ -649,7 +645,8 @@ bool NotificationView::IsExpansionNeeded(int width) {
bool NotificationView::IsMessageExpansionNeeded(int width) {
int current = GetMessageLines(width, GetMessageLineLimit(width));
- int expanded = GetMessageLines(width, kMessageExpandedLineLimit);
+ int expanded = GetMessageLines(width,
+ message_center::kMessageExpandedLineLimit);
return current < expanded;
}
@@ -657,15 +654,16 @@ int NotificationView::GetMessageLineLimit(int width) {
// Expanded notifications get a larger limit, except for image notifications,
// whose images must be kept flush against their icons.
if (is_expanded() && !image_view_)
- return kMessageExpandedLineLimit;
+ return message_center::kMessageExpandedLineLimit;
// If there's a title ensure title + message lines <= collapsed line limit.
if (title_view_) {
int title_lines = title_view_->GetLinesForWidthAndLimit(width, -1);
- return std::max(kMessageCollapsedLineLimit - title_lines, 0);
+ return std::max(message_center::kMessageCollapsedLineLimit - title_lines,
+ 0);
}
- return kMessageCollapsedLineLimit;
+ return message_center::kMessageCollapsedLineLimit;
}
int NotificationView::GetMessageLines(int width, int limit) {
diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc
index 76aab40353..eeef62de33 100644
--- a/ui/message_center/views/notifier_settings_view.cc
+++ b/ui/message_center/views/notifier_settings_view.cc
@@ -79,7 +79,7 @@ void EntryView::Layout() {
gfx::Size EntryView::GetPreferredSize() {
DCHECK_EQ(1, child_count());
gfx::Size size = child_at(0)->GetPreferredSize();
- size.ClampToMin(gfx::Size(kMinimumWindowWidth, kEntryHeight));
+ size.SetToMax(gfx::Size(kMinimumWindowWidth, kEntryHeight));
return size;
}
diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc
index 5d9714df5d..64d16566dd 100644
--- a/ui/message_center/views/toast_contents_view.cc
+++ b/ui/message_center/views/toast_contents_view.cc
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "base/time.h"
#include "base/timer.h"
+#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/message_center/message_center.h"
@@ -56,13 +57,6 @@ ToastContentsView::ToastContentsView(
// remains. This is hacky but easier to keep the consistency.
set_background(views::Background::CreateSolidBackground(0, 0, 0, 0));
- // Creates the timer only when it does the timeout (i.e. not never-timeout).
- if (!notification->never_timeout()) {
- timer_.reset(new base::OneShotTimer<ToastContentsView>);
- ResetTimeout(notification->priority());
- StartTimer();
- }
-
fade_animation_.reset(new ui::SlideAnimation(this));
fade_animation_->SetSlideDuration(kFadeInOutDuration);
}
@@ -95,37 +89,6 @@ void ToastContentsView::SetContents(MessageView* view) {
Layout();
}
-void ToastContentsView::ResetTimeout(int priority) {
- int seconds = kAutocloseDefaultDelaySeconds;
- if (priority > DEFAULT_PRIORITY)
- seconds = kAutocloseHighPriorityDelaySeconds;
- timeout_ = base::TimeDelta::FromSeconds(seconds);
- // If timer exists and is not suspended, re-start it with new timeout.
- if (timer_.get() && timer_->IsRunning())
- StartTimer();
-}
-
-void ToastContentsView::SuspendTimer() {
- if (!timer_.get() || !timer_->IsRunning())
- return;
- timer_->Stop();
- passed_ += base::Time::Now() - start_time_;
-}
-
-void ToastContentsView::StartTimer() {
- if (!timer_.get())
- return;
-
- base::TimeDelta timeout_to_close =
- timeout_ <= passed_ ? base::TimeDelta() : timeout_ - passed_;
- start_time_ = base::Time::Now();
- timer_->Start(FROM_HERE,
- timeout_to_close,
- base::Bind(&ToastContentsView::CloseWithAnimation,
- base::Unretained(this),
- true));
-}
-
void ToastContentsView::RevealWithAnimation(gfx::Point origin) {
// Place/move the toast widgets. Currently it stacks the widgets from the
// right-bottom of the work area.
@@ -146,7 +109,6 @@ void ToastContentsView::CloseWithAnimation(bool mark_as_shown) {
if (is_closing_)
return;
is_closing_ = true;
- timer_.reset();
if (collection_)
collection_->RemoveToast(this);
if (mark_as_shown)
@@ -263,7 +225,6 @@ views::View* ToastContentsView::GetContentsView() {
}
void ToastContentsView::WindowClosing() {
- SuspendTimer();
if (!is_closing_ && collection_)
collection_->RemoveToast(this);
}
@@ -298,6 +259,12 @@ gfx::Size ToastContentsView::GetPreferredSize() {
return child_count() ? GetToastSizeForView(child_at(0)) : gfx::Size();
}
+void ToastContentsView::GetAccessibleState(ui::AccessibleViewState* state) {
+ if (child_count() > 0)
+ child_at(0)->GetAccessibleState(state);
+ state->role = ui::AccessibilityTypes::ROLE_WINDOW;
+}
+
gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) {
return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth,
bounds.y(),
diff --git a/ui/message_center/views/toast_contents_view.h b/ui/message_center/views/toast_contents_view.h
index 6aec3fe6c6..1bf9b92898 100644
--- a/ui/message_center/views/toast_contents_view.h
+++ b/ui/message_center/views/toast_contents_view.h
@@ -7,7 +7,6 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "base/timer.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -44,13 +43,6 @@ class ToastContentsView : public views::WidgetDelegateView,
views::Widget* CreateWidget(gfx::NativeView parent);
void SetContents(MessageView* view);
- // Expiration timer control.
- // (Re-)initializes the timer, initially and on notification update.
- void ResetTimeout(int priority);
- void SuspendTimer();
- // (Re-)starts the timer, initially or after it was supended.
- void StartTimer();
-
// Shows the new toast for the first time, animated.
// |origin| is the right-bottom corner of the toast.
void RevealWithAnimation(gfx::Point origin);
@@ -76,6 +68,7 @@ class ToastContentsView : public views::WidgetDelegateView,
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
virtual void Layout() OVERRIDE;
virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
private:
// Overridden from ui::AnimationDelegate:
@@ -103,13 +96,6 @@ class ToastContentsView : public views::WidgetDelegateView,
// Id if the corresponding Notification.
std::string id_;
- // Expiration timer values.
- base::TimeDelta timeout_;
- base::TimeDelta passed_;
- base::Time start_time_;
- scoped_ptr<base::OneShotTimer<ToastContentsView> > timer_;
-
-
scoped_ptr<ui::SlideAnimation> bounds_animation_;
scoped_ptr<ui::SlideAnimation> fade_animation_;
diff --git a/ui/metro_viewer/metro_viewer_messages.h b/ui/metro_viewer/metro_viewer_messages.h
index f301618aa6..d26b12d392 100644
--- a/ui/metro_viewer/metro_viewer_messages.h
+++ b/ui/metro_viewer/metro_viewer_messages.h
@@ -145,3 +145,9 @@ IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetCursorPos,
// Ack sent by the viewer process indicating that the SetCursorPos operation
// was completed.
IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_SetCursorPosAck)
+
+IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_OpenURL,
+ string16) /* url */
+
+IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_SearchRequest,
+ string16) /* search_string */
diff --git a/ui/native_theme/native_theme.target.darwin-arm.mk b/ui/native_theme/native_theme.target.darwin-arm.mk
index 90eafe43e1..b9d5935237 100644
--- a/ui/native_theme/native_theme.target.darwin-arm.mk
+++ b/ui/native_theme/native_theme.target.darwin-arm.mk
@@ -74,7 +74,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/native_theme/native_theme.target.darwin-x86.mk b/ui/native_theme/native_theme.target.darwin-x86.mk
index 74153a73a4..a05b8948d8 100644
--- a/ui/native_theme/native_theme.target.darwin-x86.mk
+++ b/ui/native_theme/native_theme.target.darwin-x86.mk
@@ -76,7 +76,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/native_theme/native_theme.target.linux-arm.mk b/ui/native_theme/native_theme.target.linux-arm.mk
index 90eafe43e1..b9d5935237 100644
--- a/ui/native_theme/native_theme.target.linux-arm.mk
+++ b/ui/native_theme/native_theme.target.linux-arm.mk
@@ -74,7 +74,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/native_theme/native_theme.target.linux-x86.mk b/ui/native_theme/native_theme.target.linux-x86.mk
index 74153a73a4..a05b8948d8 100644
--- a/ui/native_theme/native_theme.target.linux-x86.mk
+++ b/ui/native_theme/native_theme.target.linux-x86.mk
@@ -76,7 +76,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/oak/oak.gyp b/ui/oak/oak.gyp
index 216d198456..ac07c63843 100644
--- a/ui/oak/oak.gyp
+++ b/ui/oak/oak.gyp
@@ -14,8 +14,8 @@
'dependencies': [
'../../base/base.gyp:base',
'../../base/base.gyp:base_i18n',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../skia/skia.gyp:skia',
+ '../../url/url.gyp:url_lib',
'../aura/aura.gyp:aura',
'../compositor/compositor.gyp:compositor',
'../ui.gyp:ui',
diff --git a/ui/oak/oak_aura_window_display.cc b/ui/oak/oak_aura_window_display.cc
index 228e1d4876..ac05226c84 100644
--- a/ui/oak/oak_aura_window_display.cc
+++ b/ui/oak/oak_aura_window_display.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/aura/window.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/oak/oak_pretty_print.h"
diff --git a/ui/oak/oak_pretty_print.cc b/ui/oak/oak_pretty_print.cc
index f549dcc051..1843ff08ba 100644
--- a/ui/oak/oak_pretty_print.cc
+++ b/ui/oak/oak_pretty_print.cc
@@ -4,10 +4,10 @@
#include "ui/oak/oak_pretty_print.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
#include "base/string_number_conversions.h"
+#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/rect.h"
diff --git a/ui/oak/oak_tree_model.cc b/ui/oak/oak_tree_model.cc
index 82650b8153..375c3c0fcb 100644
--- a/ui/oak/oak_tree_model.cc
+++ b/ui/oak/oak_tree_model.cc
@@ -4,7 +4,7 @@
#include "ui/oak/oak_tree_model.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/base/models/tree_node_model.h"
diff --git a/ui/oak/oak_window.cc b/ui/oak/oak_window.cc
index e213a505fd..721633040e 100644
--- a/ui/oak/oak_window.cc
+++ b/ui/oak/oak_window.cc
@@ -4,7 +4,7 @@
#include "ui/oak/oak_window.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "ui/aura/root_window.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/ui/resources/default_100_percent/common/notification_arrow.png b/ui/resources/default_100_percent/common/notification_arrow.png
new file mode 100644
index 0000000000..16f6fdb78d
--- /dev/null
+++ b/ui/resources/default_100_percent/common/notification_arrow.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/notification_arrow_hover.png b/ui/resources/default_100_percent/common/notification_arrow_hover.png
new file mode 100644
index 0000000000..73d724bc6c
--- /dev/null
+++ b/ui/resources/default_100_percent/common/notification_arrow_hover.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/notification_arrow_pressed.png b/ui/resources/default_100_percent/common/notification_arrow_pressed.png
new file mode 100644
index 0000000000..49d474d806
--- /dev/null
+++ b/ui/resources/default_100_percent/common/notification_arrow_pressed.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/pointers/context_menu.png b/ui/resources/default_100_percent/common/pointers/context_menu.png
index 8d729c6dc3..ee1a0e18ba 100644
--- a/ui/resources/default_100_percent/common/pointers/context_menu.png
+++ b/ui/resources/default_100_percent/common/pointers/context_menu.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/pointers/help.png b/ui/resources/default_100_percent/common/pointers/help.png
index 4366bc432e..dce866963a 100644
--- a/ui/resources/default_100_percent/common/pointers/help.png
+++ b/ui/resources/default_100_percent/common/pointers/help.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/pointers/left_ptr.png b/ui/resources/default_100_percent/common/pointers/left_ptr.png
index 4ae6dbe9e9..f8fcc38e2d 100644
--- a/ui/resources/default_100_percent/common/pointers/left_ptr.png
+++ b/ui/resources/default_100_percent/common/pointers/left_ptr.png
Binary files differ
diff --git a/ui/resources/default_100_percent/common/text_selection_handle.png b/ui/resources/default_100_percent/common/text_selection_handle.png
new file mode 100644
index 0000000000..66c5351f69
--- /dev/null
+++ b/ui/resources/default_100_percent/common/text_selection_handle.png
Binary files differ
diff --git a/ui/resources/default_100_percent/mac/tray_icon_pressed.png b/ui/resources/default_100_percent/mac/tray_icon_pressed.png
index 1b052cf177..e5c04490bc 100644
--- a/ui/resources/default_100_percent/mac/tray_icon_pressed.png
+++ b/ui/resources/default_100_percent/mac/tray_icon_pressed.png
Binary files differ
diff --git a/ui/resources/default_100_percent/mac/tray_icon_regular.png b/ui/resources/default_100_percent/mac/tray_icon_regular.png
index 3a68407ee6..11aff0a35b 100644
--- a/ui/resources/default_100_percent/mac/tray_icon_regular.png
+++ b/ui/resources/default_100_percent/mac/tray_icon_regular.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/notification_arrow.png b/ui/resources/default_200_percent/common/notification_arrow.png
new file mode 100644
index 0000000000..f1c62476c0
--- /dev/null
+++ b/ui/resources/default_200_percent/common/notification_arrow.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/notification_arrow_hover.png b/ui/resources/default_200_percent/common/notification_arrow_hover.png
new file mode 100644
index 0000000000..842bc1773f
--- /dev/null
+++ b/ui/resources/default_200_percent/common/notification_arrow_hover.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/notification_arrow_pressed.png b/ui/resources/default_200_percent/common/notification_arrow_pressed.png
new file mode 100644
index 0000000000..674635872f
--- /dev/null
+++ b/ui/resources/default_200_percent/common/notification_arrow_pressed.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/pointers/context_menu.png b/ui/resources/default_200_percent/common/pointers/context_menu.png
index 581c38b242..d98d1e629f 100644
--- a/ui/resources/default_200_percent/common/pointers/context_menu.png
+++ b/ui/resources/default_200_percent/common/pointers/context_menu.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/pointers/help.png b/ui/resources/default_200_percent/common/pointers/help.png
index d586358f5c..104217009a 100644
--- a/ui/resources/default_200_percent/common/pointers/help.png
+++ b/ui/resources/default_200_percent/common/pointers/help.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/pointers/left_ptr.png b/ui/resources/default_200_percent/common/pointers/left_ptr.png
index e45678cda3..3d2b398d8a 100644
--- a/ui/resources/default_200_percent/common/pointers/left_ptr.png
+++ b/ui/resources/default_200_percent/common/pointers/left_ptr.png
Binary files differ
diff --git a/ui/resources/default_200_percent/common/text_selection_handle.png b/ui/resources/default_200_percent/common/text_selection_handle.png
new file mode 100644
index 0000000000..4f52654ea5
--- /dev/null
+++ b/ui/resources/default_200_percent/common/text_selection_handle.png
Binary files differ
diff --git a/ui/resources/default_200_percent/mac/tray_icon_pressed.png b/ui/resources/default_200_percent/mac/tray_icon_pressed.png
index 885a3957a8..c9bde11906 100644
--- a/ui/resources/default_200_percent/mac/tray_icon_pressed.png
+++ b/ui/resources/default_200_percent/mac/tray_icon_pressed.png
Binary files differ
diff --git a/ui/resources/default_200_percent/mac/tray_icon_regular.png b/ui/resources/default_200_percent/mac/tray_icon_regular.png
index bc83959fc8..b749e46c68 100644
--- a/ui/resources/default_200_percent/mac/tray_icon_regular.png
+++ b/ui/resources/default_200_percent/mac/tray_icon_regular.png
Binary files differ
diff --git a/ui/resources/ui_resources.grd b/ui/resources/ui_resources.grd
index b90cde6bad..53bbaf7c5c 100644
--- a/ui/resources/ui_resources.grd
+++ b/ui/resources/ui_resources.grd
@@ -170,6 +170,60 @@
<structure type="chrome_scaled_image" name="IDR_BUTTON_PRESSED_TOP" file="common/button_pressed_top.png" />
<structure type="chrome_scaled_image" name="IDR_BUTTON_PRESSED_TOP_LEFT" file="common/button_pressed_top_left.png" />
<structure type="chrome_scaled_image" name="IDR_BUTTON_PRESSED_TOP_RIGHT" file="common/button_pressed_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_BOTTOM" file="common/blue_button_focused_hover_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_BOTTOM_LEFT" file="common/blue_button_focused_hover_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_BOTTOM_RIGHT" file="common/blue_button_focused_hover_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_CENTER" file="common/blue_button_focused_hover_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_LEFT" file="common/blue_button_focused_hover_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_RIGHT" file="common/blue_button_focused_hover_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_TOP" file="common/blue_button_focused_hover_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_TOP_LEFT" file="common/blue_button_focused_hover_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_HOVER_TOP_RIGHT" file="common/blue_button_focused_hover_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_BOTTOM" file="common/blue_button_focused_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_BOTTOM_LEFT" file="common/blue_button_focused_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_BOTTOM_RIGHT" file="common/blue_button_focused_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_CENTER" file="common/blue_button_focused_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_LEFT" file="common/blue_button_focused_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_RIGHT" file="common/blue_button_focused_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_TOP" file="common/blue_button_focused_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_TOP_LEFT" file="common/blue_button_focused_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_NORMAL_TOP_RIGHT" file="common/blue_button_focused_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_BOTTOM" file="common/blue_button_focused_pressed_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_BOTTOM_LEFT" file="common/blue_button_focused_pressed_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_BOTTOM_RIGHT" file="common/blue_button_focused_pressed_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_CENTER" file="common/blue_button_focused_pressed_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_LEFT" file="common/blue_button_focused_pressed_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_RIGHT" file="common/blue_button_focused_pressed_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_TOP" file="common/blue_button_focused_pressed_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_TOP_LEFT" file="common/blue_button_focused_pressed_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_FOCUSED_PRESSED_TOP_RIGHT" file="common/blue_button_focused_pressed_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_BOTTOM" file="common/blue_button_hover_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_BOTTOM_LEFT" file="common/blue_button_hover_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_BOTTOM_RIGHT" file="common/blue_button_hover_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_CENTER" file="common/blue_button_hover_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_LEFT" file="common/blue_button_hover_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_RIGHT" file="common/blue_button_hover_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_TOP" file="common/blue_button_hover_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_TOP_LEFT" file="common/blue_button_hover_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_HOVER_TOP_RIGHT" file="common/blue_button_hover_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_BOTTOM" file="common/blue_button_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_BOTTOM_LEFT" file="common/blue_button_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_BOTTOM_RIGHT" file="common/blue_button_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_CENTER" file="common/blue_button_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_LEFT" file="common/blue_button_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_RIGHT" file="common/blue_button_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_TOP" file="common/blue_button_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_TOP_LEFT" file="common/blue_button_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_NORMAL_TOP_RIGHT" file="common/blue_button_top_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_BOTTOM" file="common/blue_button_pressed_bottom.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_BOTTOM_LEFT" file="common/blue_button_pressed_bottom_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_BOTTOM_RIGHT" file="common/blue_button_pressed_bottom_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_CENTER" file="common/blue_button_pressed_center.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_LEFT" file="common/blue_button_pressed_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_RIGHT" file="common/blue_button_pressed_right.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_TOP" file="common/blue_button_pressed_top.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_TOP_LEFT" file="common/blue_button_pressed_top_left.png" />
+ <structure type="chrome_scaled_image" name="IDR_BLUE_BUTTON_PRESSED_TOP_RIGHT" file="common/blue_button_pressed_top_right.png" />
<structure type="chrome_scaled_image" name="IDR_CHECKBOX" file="common/checkbox.png" />
<structure type="chrome_scaled_image" name="IDR_CHECKBOX_CHECKED" file="common/checkbox_checked.png" />
<structure type="chrome_scaled_image" name="IDR_CHECKBOX_CHECKED_DISABLED" file="common/checkbox_checked_inactive.png" />
@@ -184,6 +238,7 @@
<structure type="chrome_scaled_image" name="IDR_CHECKBOX_FOCUSED_PRESSED" file="common/checkbox_focused_pressed.png" />
<structure type="chrome_scaled_image" name="IDR_CHECKBOX_HOVER" file="common/checkbox_hover.png" />
<structure type="chrome_scaled_image" name="IDR_CHECKBOX_PRESSED" file="common/checkbox_pressed.png" />
+ <structure type="chrome_scaled_image" name="IDR_CHECKMARK" file="common/checkmark.png" />
<structure type="chrome_scaled_image" name="IDR_RADIO" file="common/radio.png" />
<structure type="chrome_scaled_image" name="IDR_RADIO_CHECKED" file="common/radio_checked.png" />
<structure type="chrome_scaled_image" name="IDR_RADIO_CHECKED_DISABLED" file="common/radio_checked_inactive.png" />
@@ -198,7 +253,7 @@
<structure type="chrome_scaled_image" name="IDR_RADIO_FOCUSED_PRESSED" file="common/radio_focused_pressed.png" />
<structure type="chrome_scaled_image" name="IDR_RADIO_HOVER" file="common/radio_hover.png" />
<structure type="chrome_scaled_image" name="IDR_RADIO_PRESSED" file="common/radio_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_CHECKMARK" file="common/checkmark.png" />
+ <structure type="chrome_scaled_image" name="IDR_TEXT_SELECTION_HANDLE" file="common/text_selection_handle.png" />
<if expr="not pp_ifdef('toolkit_views') and is_posix and not is_macosx">
<structure type="chrome_scaled_image" name="IDR_CLOSE" file="linux/linux_close.png" />
</if>
@@ -281,6 +336,9 @@
<structure type="chrome_scaled_image" name="IDR_MINIMIZE_H" file="minimize_hover.png" />
<structure type="chrome_scaled_image" name="IDR_MINIMIZE_P" file="minimize_pressed.png" />
</if>
+ <structure type="chrome_scaled_image" name="IDR_NOTIFICATION_ARROW" file="common/notification_arrow.png"/>
+ <structure type="chrome_scaled_image" name="IDR_NOTIFICATION_ARROW_HOVER" file="common/notification_arrow_hover.png"/>
+ <structure type="chrome_scaled_image" name="IDR_NOTIFICATION_ARROW_PRESSED" file="common/notification_arrow_pressed.png"/>
<structure type="chrome_scaled_image" name="IDR_NOTIFICATION_CLEAR_ALL" file="common/notification_clear_all.png"/>
<structure type="chrome_scaled_image" name="IDR_NOTIFICATION_CLEAR_ALL_HOVER" file="common/notification_clear_all_hover.png"/>
<structure type="chrome_scaled_image" name="IDR_NOTIFICATION_CLEAR_ALL_PRESSED" file="common/notification_clear_all_pressed.png"/>
diff --git a/ui/shell_dialogs.target.darwin-arm.mk b/ui/shell_dialogs.target.darwin-arm.mk
index 5a1f1cb128..e71a3df4da 100644
--- a/ui/shell_dialogs.target.darwin-arm.mk
+++ b/ui/shell_dialogs.target.darwin-arm.mk
@@ -78,7 +78,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/shell_dialogs.target.darwin-x86.mk b/ui/shell_dialogs.target.darwin-x86.mk
index bd63afe764..a9ae5d33ea 100644
--- a/ui/shell_dialogs.target.darwin-x86.mk
+++ b/ui/shell_dialogs.target.darwin-x86.mk
@@ -80,7 +80,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/shell_dialogs.target.linux-arm.mk b/ui/shell_dialogs.target.linux-arm.mk
index 5a1f1cb128..e71a3df4da 100644
--- a/ui/shell_dialogs.target.linux-arm.mk
+++ b/ui/shell_dialogs.target.linux-arm.mk
@@ -78,7 +78,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/shell_dialogs.target.linux-x86.mk b/ui/shell_dialogs.target.linux-x86.mk
index bd63afe764..a9ae5d33ea 100644
--- a/ui/shell_dialogs.target.linux-x86.mk
+++ b/ui/shell_dialogs.target.linux-x86.mk
@@ -80,7 +80,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl.h b/ui/shell_dialogs/gtk/select_file_dialog_impl.h
index b0206e0661..19118278b1 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl.h
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl.h
@@ -45,7 +45,7 @@ class SelectFileDialogImpl : public SelectFileDialog {
// |params| is user data we pass back via the Listener interface.
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
index c47ad0bec6..c57acdfb29 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
@@ -13,9 +13,9 @@
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
-#include "base/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/l10n/l10n_util.h"
@@ -49,7 +49,7 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
// |params| is user data we pass back via the Listener interface.
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -166,7 +166,7 @@ bool SelectFileDialogImplGTK::HasMultipleFileTypeChoicesImpl() {
// We ignore |default_extension|.
void SelectFileDialogImplGTK::SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
index 3ac92ec211..98ed98b57a 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
@@ -15,9 +15,9 @@
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/threading/worker_pool.h"
-#include "base/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/shell_dialogs/gtk/select_file_dialog_impl.h"
@@ -49,7 +49,7 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
// |params| is user data we pass back via the Listener interface.
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -170,7 +170,7 @@ SelectFileDialogImplKDE::~SelectFileDialogImplKDE() {
// We ignore |default_extension|.
void SelectFileDialogImplKDE::SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
diff --git a/ui/shell_dialogs/select_file_dialog.cc b/ui/shell_dialogs/select_file_dialog.cc
index 8cdf5db378..0c90dd2be2 100644
--- a/ui/shell_dialogs/select_file_dialog.cc
+++ b/ui/shell_dialogs/select_file_dialog.cc
@@ -101,7 +101,7 @@ scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
void SelectFileDialog::SelectFile(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
index 9a23485a14..9ea0bc40be 100644
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -27,7 +27,7 @@ class ShellDialogsDelegate;
// Shows a dialog box for selecting a file or a folder.
class SHELL_DIALOGS_EXPORT SelectFileDialog
: public base::RefCountedThreadSafe<SelectFileDialog>,
- public ui::BaseShellDialog {
+ public BaseShellDialog {
public:
enum Type {
SELECT_NONE,
@@ -54,7 +54,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
//
// If not overridden, calls FileSelected() with path from |file|.
virtual void FileSelectedWithExtraInfo(
- const ui::SelectedFileInfo& file,
+ const SelectedFileInfo& file,
int index,
void* params);
@@ -68,7 +68,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
//
// If not overridden, calls MultiFilesSelected() with paths from |files|.
virtual void MultiFilesSelectedWithExtraInfo(
- const std::vector<ui::SelectedFileInfo>& files,
+ const std::vector<SelectedFileInfo>& files,
void* params);
// Notifies the Listener that the file/folder selection was aborted (via
@@ -86,13 +86,13 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// This is optional and should only be used by components that have to live
// elsewhere in the tree due to layering violations. (For example, because of
// a dependency on chrome's extension system.)
- static void SetFactory(ui::SelectFileDialogFactory* factory);
+ static void SetFactory(SelectFileDialogFactory* factory);
// Creates a dialog box helper. This is an inexpensive wrapper around the
// platform-native file selection dialog. |policy| is an optional class that
// can prevent showing a dialog.
static scoped_refptr<SelectFileDialog> Create(Listener* listener,
- ui::SelectFilePolicy* policy);
+ SelectFilePolicy* policy);
// Holds information about allowed extensions on a file save dialog.
struct SHELL_DIALOGS_EXPORT FileTypeInfo {
@@ -110,7 +110,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Overrides the system descriptions of the specified extensions. Entries
// correspond to |extensions|; if left blank the system descriptions will
// be used.
- std::vector<string16> extension_description_overrides;
+ std::vector<base::string16> extension_description_overrides;
// Specifies whether there will be a filter added for all files (i.e. *.*).
bool include_all_files;
@@ -147,7 +147,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// NOTE: only one instance of any shell dialog can be shown per owning_window
// at a time (for obvious reasons).
void SelectFile(Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -161,8 +161,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
- explicit SelectFileDialog(Listener* listener,
- ui::SelectFilePolicy* policy);
+ explicit SelectFileDialog(Listener* listener, SelectFilePolicy* policy);
virtual ~SelectFileDialog();
// Displays the actual file-selection dialog.
@@ -171,7 +170,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// AllowFileSelectionDialogs-Policy.
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -198,7 +197,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Returns true if the dialog has multiple file type choices.
virtual bool HasMultipleFileTypeChoicesImpl() = 0;
- scoped_ptr<ui::SelectFilePolicy> select_file_policy_;
+ scoped_ptr<SelectFilePolicy> select_file_policy_;
DISALLOW_COPY_AND_ASSIGN(SelectFileDialog);
};
@@ -206,4 +205,3 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
} // namespace ui
#endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_H_
-
diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc
index 6bed380d35..3886303fc4 100644
--- a/ui/shell_dialogs/select_file_dialog_android.cc
+++ b/ui/shell_dialogs/select_file_dialog_android.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "jni/SelectFileDialog_jni.h"
#include "ui/android/window_android.h"
@@ -19,7 +19,7 @@ namespace ui {
// static
SelectFileDialogImpl* SelectFileDialogImpl::Create(Listener* listener,
- ui::SelectFilePolicy* policy) {
+ SelectFilePolicy* policy) {
return new SelectFileDialogImpl(listener, policy);
}
@@ -52,8 +52,8 @@ void SelectFileDialogImpl::ListenerDestroyed() {
}
void SelectFileDialogImpl::SelectFileImpl(
- ui::SelectFileDialog::Type type,
- const string16& title,
+ SelectFileDialog::Type type,
+ const base::string16& title,
const base::FilePath& default_path,
const SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
@@ -63,9 +63,9 @@ void SelectFileDialogImpl::SelectFileImpl(
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jstring> capture_value;
- std::vector<string16> accept_types;
+ std::vector<base::string16> accept_types;
if (params) {
- accept_types = *(reinterpret_cast<std::vector<string16>*>(params));
+ accept_types = *(reinterpret_cast<std::vector<base::string16>*>(params));
// The last string in params is expected to be the string
// with capture value.
@@ -96,9 +96,8 @@ SelectFileDialogImpl::~SelectFileDialogImpl() {
}
SelectFileDialogImpl::SelectFileDialogImpl(Listener* listener,
- ui::SelectFilePolicy* policy)
- : ui::SelectFileDialog(listener, policy),
- is_running_(false) {
+ SelectFilePolicy* policy)
+ : SelectFileDialog(listener, policy), is_running_(false) {
JNIEnv* env = base::android::AttachCurrentThread();
java_object_.Reset(
Java_SelectFileDialog_create(env, reinterpret_cast<jint>(this)));
diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/select_file_dialog_android.h
index e31d3b3d55..911dc483ed 100644
--- a/ui/shell_dialogs/select_file_dialog_android.h
+++ b/ui/shell_dialogs/select_file_dialog_android.h
@@ -13,11 +13,10 @@
namespace ui {
-class SelectFileDialogImpl : public ui::SelectFileDialog {
+class SelectFileDialogImpl : public SelectFileDialog {
public:
- static SelectFileDialogImpl* Create(
- Listener* listener,
- ui::SelectFilePolicy* policy);
+ static SelectFileDialogImpl* Create(Listener* listener,
+ SelectFilePolicy* policy);
void OnFileSelected(JNIEnv* env, jobject java_object, jstring filepath);
void OnFileNotSelected(JNIEnv* env, jobject java_object);
@@ -27,13 +26,13 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
virtual void ListenerDestroyed() OVERRIDE;
// Called when it is time to display the file picker.
- // params is expected to be a Vector<string16> with accept_types first and
+ // params is expected to be a vector<string16> with accept_types first and
// the capture value as the last element of the vector.
virtual void SelectFileImpl(
- ui::SelectFileDialog::Type type,
- const string16& title,
+ SelectFileDialog::Type type,
+ const base::string16& title,
const base::FilePath& default_path,
- const ui::SelectFileDialog::FileTypeInfo* file_types,
+ const SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
const std::string& default_extension,
gfx::NativeWindow owning_window,
@@ -45,7 +44,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
virtual ~SelectFileDialogImpl();
private:
- SelectFileDialogImpl(Listener* listener, ui::SelectFilePolicy* policy);
+ SelectFileDialogImpl(Listener* listener, SelectFilePolicy* policy);
virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index e962a9868f..7a376c24b3 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -83,7 +83,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
// |params| is user data we pass back via the Listener interface.
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -171,7 +171,7 @@ bool SelectFileDialogImpl::ShouldEnableFilename(NSSavePanel* dialog,
void SelectFileDialogImpl::SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
index b253ba3490..d4b51ebff0 100644
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -18,8 +18,8 @@
#include "base/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/string_split.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
-#include "base/utf_string_conversions.h"
#include "base/win/metro.h"
#include "base/win/registry.h"
#include "base/win/scoped_comptr.h"
@@ -421,7 +421,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
// SelectFileDialog implementation:
virtual void SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -516,7 +516,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
// Returns the filter to be used while displaying the open/save file dialog.
// This is computed from the extensions for the file types being opened.
- string16 GetFilterForFileTypes(const FileTypeInfo& file_types);
+ base::string16 GetFilterForFileTypes(const FileTypeInfo& file_types);
bool has_multiple_file_type_choices_;
@@ -535,7 +535,7 @@ SelectFileDialogImpl::~SelectFileDialogImpl() {
void SelectFileDialogImpl::SelectFileImpl(
Type type,
- const string16& title,
+ const base::string16& title,
const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
@@ -619,7 +619,7 @@ void SelectFileDialogImpl::ListenerDestroyed() {
void SelectFileDialogImpl::ExecuteSelectFile(
const ExecuteSelectParams& params) {
- string16 filter = GetFilterForFileTypes(params.file_types);
+ base::string16 filter = GetFilterForFileTypes(params.file_types);
base::FilePath path = params.default_path;
bool success = false;
@@ -855,12 +855,12 @@ bool SelectFileDialogImpl::RunOpenMultiFileDialog(
return success;
}
-string16 SelectFileDialogImpl::GetFilterForFileTypes(
+base::string16 SelectFileDialogImpl::GetFilterForFileTypes(
const FileTypeInfo& file_types) {
- std::vector<string16> exts;
+ std::vector<base::string16> exts;
for (size_t i = 0; i < file_types.extensions.size(); ++i) {
- const std::vector<string16>& inner_exts = file_types.extensions[i];
- string16 ext_string;
+ const std::vector<base::string16>& inner_exts = file_types.extensions[i];
+ base::string16 ext_string;
for (size_t j = 0; j < inner_exts.size(); ++j) {
if (!ext_string.empty())
ext_string.push_back(L';');
diff --git a/ui/snapshot/snapshot.gyp b/ui/snapshot/snapshot.gyp
index 9f71d0d205..2346483b0c 100644
--- a/ui/snapshot/snapshot.gyp
+++ b/ui/snapshot/snapshot.gyp
@@ -66,6 +66,12 @@
'../compositor/compositor.gyp:compositor_test_support',
],
}],
+ # See http://crbug.com/162998#c4 for why this is needed.
+ ['OS=="linux" and linux_use_tcmalloc==1', {
+ 'dependencies': [
+ '../../base/allocator/allocator.gyp:allocator',
+ ],
+ }],
],
},
],
diff --git a/ui/snapshot/snapshot.target.darwin-arm.mk b/ui/snapshot/snapshot.target.darwin-arm.mk
index af165b125a..8d0258ce34 100644
--- a/ui/snapshot/snapshot.target.darwin-arm.mk
+++ b/ui/snapshot/snapshot.target.darwin-arm.mk
@@ -69,7 +69,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/snapshot/snapshot.target.darwin-x86.mk b/ui/snapshot/snapshot.target.darwin-x86.mk
index 506829070f..b8f92da7c3 100644
--- a/ui/snapshot/snapshot.target.darwin-x86.mk
+++ b/ui/snapshot/snapshot.target.darwin-x86.mk
@@ -71,7 +71,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/snapshot/snapshot.target.linux-arm.mk b/ui/snapshot/snapshot.target.linux-arm.mk
index af165b125a..8d0258ce34 100644
--- a/ui/snapshot/snapshot.target.linux-arm.mk
+++ b/ui/snapshot/snapshot.target.linux-arm.mk
@@ -69,7 +69,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/snapshot/snapshot.target.linux-x86.mk b/ui/snapshot/snapshot.target.linux-x86.mk
index 506829070f..b8f92da7c3 100644
--- a/ui/snapshot/snapshot.target.linux-x86.mk
+++ b/ui/snapshot/snapshot.target.linux-x86.mk
@@ -71,7 +71,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc
index 32b1340cfd..29daf9fc54 100644
--- a/ui/snapshot/snapshot_aura.cc
+++ b/ui/snapshot/snapshot_aura.cc
@@ -5,6 +5,7 @@
#include "ui/snapshot/snapshot.h"
#include "base/logging.h"
+#include "base/safe_numerics.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "ui/aura/root_window.h"
@@ -80,8 +81,8 @@ bool GrabWindowSnapshot(gfx::NativeWindow window,
bitmap.pixelRef()->pixels());
gfx::PNGCodec::Encode(pixels, gfx::PNGCodec::FORMAT_BGRA,
gfx::Size(bitmap.width(), bitmap.height()),
- bitmap.rowBytes(), true,
- std::vector<gfx::PNGCodec::Comment>(),
+ base::checked_numeric_cast<int>(bitmap.rowBytes()),
+ true, std::vector<gfx::PNGCodec::Comment>(),
png_representation);
return true;
}
diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc
index 8f93c16ef1..206069b078 100644
--- a/ui/snapshot/snapshot_aura_unittest.cc
+++ b/ui/snapshot/snapshot_aura_unittest.cc
@@ -66,7 +66,8 @@ class SnapshotAuraTest : public testing::Test {
virtual void SetUp() OVERRIDE {
testing::Test::SetUp();
- helper_.reset(new aura::test::AuraTestHelper(MessageLoopForUI::current()));
+ helper_.reset(
+ new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
helper_->SetUp();
}
diff --git a/ui/snapshot/snapshot_mac_unittest.mm b/ui/snapshot/snapshot_mac_unittest.mm
index 900617335a..362902e3ce 100644
--- a/ui/snapshot/snapshot_mac_unittest.mm
+++ b/ui/snapshot/snapshot_mac_unittest.mm
@@ -6,20 +6,12 @@
#import <Cocoa/Cocoa.h>
+#include "base/mac/sdk_forward_declarations.h"
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "testing/platform_test.h"
#include "ui/gfx/rect.h"
-#if !defined(MAC_OS_X_VERSION_10_7) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-@interface NSWindow (LionAPI)
-- (CGFloat)backingScaleFactor;
-@end
-
-#endif // 10.7
-
namespace ui {
namespace {
diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc
index bb19b7d69f..41983c51b3 100644
--- a/ui/surface/accelerated_surface_win.cc
+++ b/ui/surface/accelerated_surface_win.cc
@@ -25,6 +25,7 @@
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/latency_info.h"
#include "ui/base/win/dpi.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/shell.h"
@@ -174,7 +175,7 @@ PresentThread::PresentThread(const char* name, uint64 adapter_luid)
void PresentThread::SetAdapterLUID(uint64 adapter_luid) {
base::AutoLock locked(lock_);
- CHECK(message_loop() == MessageLoop::current());
+ CHECK(message_loop() == base::MessageLoop::current());
if (adapter_luid_ == adapter_luid)
return;
@@ -380,11 +381,13 @@ scoped_refptr<AcceleratedPresenter> AcceleratedPresenter::GetForWindow(
void AcceleratedPresenter::AsyncPresentAndAcknowledge(
const gfx::Size& size,
int64 surface_handle,
+ const ui::LatencyInfo& latency_info,
const CompletionTask& completion_task) {
if (!surface_handle) {
TRACE_EVENT1("gpu", "EarlyOut_ZeroSurfaceHandle",
"surface_handle", surface_handle);
- completion_task.Run(true, base::TimeTicks(), base::TimeDelta());
+ completion_task.Run(
+ true, base::TimeTicks(), base::TimeDelta(), ui::LatencyInfo());
return;
}
@@ -394,6 +397,7 @@ void AcceleratedPresenter::AsyncPresentAndAcknowledge(
this,
size,
surface_handle,
+ latency_info,
completion_task));
}
@@ -679,6 +683,7 @@ AcceleratedPresenter::~AcceleratedPresenter() {
void AcceleratedPresenter::DoPresentAndAcknowledge(
const gfx::Size& size,
int64 surface_handle,
+ const ui::LatencyInfo& latency_info,
const CompletionTask& completion_task) {
TRACE_EVENT2(
"gpu", "DoPresentAndAcknowledge",
@@ -689,18 +694,25 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
base::AutoLock locked(*present_thread_->lock());
+ latency_info_.MergeWith(latency_info);
+
// Initialize the device lazily since calling Direct3D can crash bots.
present_thread_->InitDevice();
if (!present_thread_->device()) {
- completion_task.Run(false, base::TimeTicks(), base::TimeDelta());
+ completion_task.Run(
+ false, base::TimeTicks(), base::TimeDelta(), ui::LatencyInfo());
TRACE_EVENT0("gpu", "EarlyOut_NoDevice");
return;
}
// Ensure the task is acknowledged on early out after this point.
base::ScopedClosureRunner scoped_completion_runner(
- base::Bind(completion_task, true, base::TimeTicks(), base::TimeDelta()));
+ base::Bind(completion_task,
+ true,
+ base::TimeTicks(),
+ base::TimeDelta(),
+ ui::LatencyInfo()));
// If invalidated, do nothing, the window is gone.
if (!window_) {
@@ -845,6 +857,8 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
ReleaseDC(window_, dc);
}
+ latency_info_.swap_timestamp = base::TimeTicks::HighResNow();
+
hidden_ = false;
D3DDISPLAYMODE display_mode;
@@ -903,7 +917,8 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
}
scoped_completion_runner.Release();
- completion_task.Run(true, last_vsync_time, refresh_period);
+ completion_task.Run(true, last_vsync_time, refresh_period, latency_info_);
+ latency_info_.Clear();
}
void AcceleratedPresenter::DoSuspend() {
diff --git a/ui/surface/accelerated_surface_win.h b/ui/surface/accelerated_surface_win.h
index 7aa927362f..f2f766ed99 100644
--- a/ui/surface/accelerated_surface_win.h
+++ b/ui/surface/accelerated_surface_win.h
@@ -14,6 +14,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/time.h"
#include "base/win/scoped_comptr.h"
+#include "ui/base/latency_info.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
#include "ui/surface/surface_export.h"
@@ -33,7 +34,8 @@ class SURFACE_EXPORT AcceleratedPresenter
public:
typedef base::Callback<void(bool,
base::TimeTicks,
- base::TimeDelta)> CompletionTask;
+ base::TimeDelta,
+ const ui::LatencyInfo&)> CompletionTask;
explicit AcceleratedPresenter(gfx::PluginWindowHandle window);
@@ -52,6 +54,7 @@ class SURFACE_EXPORT AcceleratedPresenter
void AsyncPresentAndAcknowledge(
const gfx::Size& size,
int64 surface_handle,
+ const ui::LatencyInfo& latency_info,
const CompletionTask& completion_task);
// Schedule the presenter to free all its resources. This can be called on any
@@ -98,6 +101,7 @@ class SURFACE_EXPORT AcceleratedPresenter
void DoPresentAndAcknowledge(
const gfx::Size& size,
int64 surface_handle,
+ const ui::LatencyInfo& latency_info,
const CompletionTask& completion_task);
void DoSuspend();
void DoPresent(const base::Closure& composite_task);
@@ -171,6 +175,8 @@ class SURFACE_EXPORT AcceleratedPresenter
gfx::Size last_window_size_;
base::Time last_window_resize_time_;
+ ui::LatencyInfo latency_info_;
+
DISALLOW_COPY_AND_ASSIGN(AcceleratedPresenter);
};
diff --git a/ui/surface/surface.target.darwin-arm.mk b/ui/surface/surface.target.darwin-arm.mk
index 93f4246021..d3f8b91d0e 100644
--- a/ui/surface/surface.target.darwin-arm.mk
+++ b/ui/surface/surface.target.darwin-arm.mk
@@ -72,7 +72,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -125,7 +124,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
$(gyp_shared_intermediate_dir)/ui/gl \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(PWD)/frameworks/wilhelm/include \
diff --git a/ui/surface/surface.target.darwin-x86.mk b/ui/surface/surface.target.darwin-x86.mk
index 8f9144f0f9..8cfc292fc8 100644
--- a/ui/surface/surface.target.darwin-x86.mk
+++ b/ui/surface/surface.target.darwin-x86.mk
@@ -74,7 +74,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -126,7 +125,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
$(gyp_shared_intermediate_dir)/ui/gl \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(PWD)/frameworks/wilhelm/include \
diff --git a/ui/surface/surface.target.linux-arm.mk b/ui/surface/surface.target.linux-arm.mk
index 93f4246021..d3f8b91d0e 100644
--- a/ui/surface/surface.target.linux-arm.mk
+++ b/ui/surface/surface.target.linux-arm.mk
@@ -72,7 +72,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -125,7 +124,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
$(gyp_shared_intermediate_dir)/ui/gl \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(PWD)/frameworks/wilhelm/include \
diff --git a/ui/surface/surface.target.linux-x86.mk b/ui/surface/surface.target.linux-x86.mk
index 8f9144f0f9..8cfc292fc8 100644
--- a/ui/surface/surface.target.linux-x86.mk
+++ b/ui/surface/surface.target.linux-x86.mk
@@ -74,7 +74,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
@@ -126,7 +125,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
$(gyp_shared_intermediate_dir)/ui/gl \
- $(LOCAL_PATH)/third_party/mesa/MesaLib/include \
+ $(LOCAL_PATH)/third_party/mesa/src/include \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(PWD)/frameworks/wilhelm/include \
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 71a3fdc898..b62489a4ea 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -20,13 +20,13 @@
'../base/base.gyp:base_i18n',
'../base/base.gyp:base_static',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../build/temp_gyp/googleurl.gyp:googleurl',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libpng/libpng.gyp:libpng',
'../third_party/zlib/zlib.gyp:zlib',
+ '../url/url.gyp:url_lib',
'base/strings/ui_strings.gyp:ui_strings',
'ui_resources',
],
@@ -87,7 +87,6 @@
'base/clipboard/clipboard_constants.cc',
'base/clipboard/clipboard_gtk.cc',
'base/clipboard/clipboard_mac.mm',
- 'base/clipboard/clipboard_sourcetag.h',
'base/clipboard/clipboard_util_win.cc',
'base/clipboard/clipboard_util_win.h',
'base/clipboard/clipboard_win.cc',
@@ -97,11 +96,16 @@
'base/clipboard/custom_data_helper_mac.mm',
'base/clipboard/scoped_clipboard_writer.cc',
'base/clipboard/scoped_clipboard_writer.h',
+ 'base/cocoa/animation_utils.h',
'base/cocoa/base_view.h',
'base/cocoa/base_view.mm',
+ 'base/cocoa/cocoa_event_utils.h',
+ 'base/cocoa/cocoa_event_utils.mm',
'base/cocoa/events_mac.mm',
'base/cocoa/find_pasteboard.h',
'base/cocoa/find_pasteboard.mm',
+ 'base/cocoa/flipped_view.h',
+ 'base/cocoa/flipped_view.mm',
'base/cocoa/focus_tracker.h',
'base/cocoa/focus_tracker.mm',
'base/cocoa/focus_window_set.h',
@@ -112,12 +116,16 @@
'base/cocoa/hover_button.mm',
'base/cocoa/hover_image_button.h',
'base/cocoa/hover_image_button.mm',
+ 'base/cocoa/menu_controller.h',
+ 'base/cocoa/menu_controller.mm',
'base/cocoa/nib_loading.h',
'base/cocoa/nib_loading.mm',
'base/cocoa/tracking_area.h',
'base/cocoa/tracking_area.mm',
'base/cocoa/underlay_opengl_hosting_window.h',
'base/cocoa/underlay_opengl_hosting_window.mm',
+ 'base/cocoa/view_description.h',
+ 'base/cocoa/view_description.mm',
'base/cocoa/window_size_constants.h',
'base/cocoa/window_size_constants.mm',
'base/cursor/cursor.cc',
@@ -270,8 +278,18 @@
'base/models/tree_model.h',
'base/models/tree_node_iterator.h',
'base/models/tree_node_model.h',
+ 'base/ozone/events_ozone.cc',
+ 'base/ozone/event_factory_ozone.cc',
+ 'base/ozone/event_factory_ozone.h',
+ 'base/ozone/event_converter_ozone.cc',
+ 'base/ozone/event_converter_ozone.h',
+ 'base/ozone/events_ozone.cc',
+ 'base/ozone/key_event_converter_ozone.cc',
+ 'base/ozone/key_event_converter_ozone.h',
'base/ozone/surface_factory_ozone.cc',
'base/ozone/surface_factory_ozone.h',
+ 'base/ozone/touch_event_converter_ozone.cc',
+ 'base/ozone/touch_event_converter_ozone.h',
'base/range/range.cc',
'base/range/range.h',
'base/range/range_mac.mm',
@@ -806,7 +824,6 @@
'libraries': [
'-lX11',
'-lXcursor',
- '-lXrandr', # For XRR* function calls in x11_util.cc.
'-lXrender', # For XRender* function calls in x11_util.cc.
],
},
@@ -815,7 +832,6 @@
'libraries': [
'-lX11',
'-lXcursor',
- '-lXrandr', # For XRR* function calls in x11_util.cc.
'-lXrender', # For XRender* function calls in x11_util.cc.
],
},
diff --git a/ui/ui.target.darwin-arm.mk b/ui/ui.target.darwin-arm.mk
index 9aede93142..2961c47bef 100644
--- a/ui/ui.target.darwin-arm.mk
+++ b/ui/ui.target.darwin-arm.mk
@@ -186,7 +186,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui.target.darwin-x86.mk b/ui/ui.target.darwin-x86.mk
index d5fcf748a0..2b86c3ec3c 100644
--- a/ui/ui.target.darwin-x86.mk
+++ b/ui/ui.target.darwin-x86.mk
@@ -188,7 +188,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui.target.linux-arm.mk b/ui/ui.target.linux-arm.mk
index 9aede93142..2961c47bef 100644
--- a/ui/ui.target.linux-arm.mk
+++ b/ui/ui.target.linux-arm.mk
@@ -186,7 +186,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui.target.linux-x86.mk b/ui/ui.target.linux-x86.mk
index d5fcf748a0..2b86c3ec3c 100644
--- a/ui/ui.target.linux-x86.mk
+++ b/ui/ui.target.linux-x86.mk
@@ -188,7 +188,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui_jni_headers.target.darwin-arm.mk b/ui/ui_jni_headers.target.darwin-arm.mk
index 168be557b2..156a134641 100644
--- a/ui/ui_jni_headers.target.darwin-arm.mk
+++ b/ui/ui_jni_headers.target.darwin-arm.mk
@@ -15,13 +15,13 @@ GYP_TARGET_DEPENDENCIES :=
### Generated for rule "ui_ui_gyp_ui_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h
@@ -30,8 +30,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_local_path := $(LO
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h
@@ -40,8 +40,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h
@@ -50,8 +50,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h
@@ -60,8 +60,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h
@@ -70,8 +70,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_local_path := $(LOC
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h
@@ -80,8 +80,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_local_path := $(L
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h
@@ -156,7 +156,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui_jni_headers.target.darwin-x86.mk b/ui/ui_jni_headers.target.darwin-x86.mk
index 042499d761..d17cee869d 100644
--- a/ui/ui_jni_headers.target.darwin-x86.mk
+++ b/ui/ui_jni_headers.target.darwin-x86.mk
@@ -15,13 +15,13 @@ GYP_TARGET_DEPENDENCIES :=
### Generated for rule "ui_ui_gyp_ui_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h
@@ -30,8 +30,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_local_path := $(LO
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h
@@ -40,8 +40,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h
@@ -50,8 +50,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h
@@ -60,8 +60,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h
@@ -70,8 +70,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_local_path := $(LOC
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h
@@ -80,8 +80,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_local_path := $(L
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h
@@ -158,7 +158,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui_jni_headers.target.linux-arm.mk b/ui/ui_jni_headers.target.linux-arm.mk
index 168be557b2..156a134641 100644
--- a/ui/ui_jni_headers.target.linux-arm.mk
+++ b/ui/ui_jni_headers.target.linux-arm.mk
@@ -15,13 +15,13 @@ GYP_TARGET_DEPENDENCIES :=
### Generated for rule "ui_ui_gyp_ui_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h
@@ -30,8 +30,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_local_path := $(LO
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h
@@ -40,8 +40,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h
@@ -50,8 +50,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h
@@ -60,8 +60,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h
@@ -70,8 +70,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_local_path := $(LOC
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h
@@ -80,8 +80,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_local_path := $(L
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h
@@ -156,7 +156,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui_jni_headers.target.linux-x86.mk b/ui/ui_jni_headers.target.linux-x86.mk
index 042499d761..d17cee869d 100644
--- a/ui/ui_jni_headers.target.linux-x86.mk
+++ b/ui/ui_jni_headers.target.linux-x86.mk
@@ -15,13 +15,13 @@ GYP_TARGET_DEPENDENCIES :=
### Generated for rule "ui_ui_gyp_ui_jni_headers_target_generate_jni_headers":
-# "{'inputs': ['../base/android/jni_generator/jni_generator.py'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
+# "{'inputs': ['../base/android/jni_generator/jni_generator.py', '../android_webview/build/jarjar-rules.txt'], 'process_outputs_as_sources': '1', 'extension': 'java', 'outputs': ['$(gyp_shared_intermediate_dir)/ui/jni/%(INPUT_ROOT)s_jni.h'], 'rule_name': 'generate_jni_headers', 'rule_sources': ['android/java/src/org/chromium/ui/Clipboard.java', 'android/java/src/org/chromium/ui/gfx/BitmapHelper.java', 'android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java', 'android/java/src/org/chromium/ui/LocalizationUtils.java', 'android/java/src/org/chromium/ui/SelectFileDialog.java', 'android/java/src/org/chromium/ui/ViewAndroid.java', 'android/java/src/org/chromium/ui/WindowAndroid.java'], 'action': ['../base/android/jni_generator/jni_generator.py', '--input_file', '$(RULE_SOURCES)', '--output_dir', '$(gyp_shared_intermediate_dir)/ui/jni', '--optimize_generation', '0', '--jarjar', '../android_webview/build/jarjar-rules.txt'], 'message': 'Generating JNI bindings from $(RULE_SOURCES)'}":
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/Clipboard.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/Clipboard.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/Clipboard_jni.h
@@ -30,8 +30,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_local_path := $(LO
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/BitmapHelper.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/BitmapHelper.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/BitmapHelper_jni.h
@@ -40,8 +40,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/DeviceDisplayInfo_jni.h
@@ -50,8 +50,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/LocalizationUtils.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/LocalizationUtils.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/LocalizationUtils_jni.h
@@ -60,8 +60,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_local_path :=
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/SelectFileDialog.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/SelectFileDialog.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/SelectFileDialog_jni.h
@@ -70,8 +70,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_local_path := $(LOC
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/ViewAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/ViewAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/ViewAndroid_jni.h
@@ -80,8 +80,8 @@ $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_local_path := $(L
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0
+$(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h: $(LOCAL_PATH)/ui/android/java/src/org/chromium/ui/WindowAndroid.java $(LOCAL_PATH)/base/android/jni_generator/jni_generator.py $(LOCAL_PATH)/android_webview/build/jarjar-rules.txt $(GYP_TARGET_DEPENDENCIES)
+ mkdir -p $(gyp_shared_intermediate_dir)/ui/jni; cd $(gyp_local_path)/ui; ../base/android/jni_generator/jni_generator.py --input_file android/java/src/org/chromium/ui/WindowAndroid.java --output_dir "$(gyp_shared_intermediate_dir)/ui/jni" --optimize_generation 0 --jarjar ../android_webview/build/jarjar-rules.txt
.PHONY: ui_ui_jni_headers_gyp_rule_trigger
ui_ui_jni_headers_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/ui/jni/WindowAndroid_jni.h
@@ -158,7 +158,6 @@ MY_DEFS := \
'-DNO_TCMALLOC' \
'-DDISABLE_NACL' \
'-DCHROMIUM_BUILD' \
- '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \
'-DUSE_LIBJPEG_TURBO=1' \
'-DUSE_PROPRIETARY_CODECS' \
'-DENABLE_GPU=1' \
diff --git a/ui/ui_resources.target.darwin-arm.mk b/ui/ui_resources.target.darwin-arm.mk
index 1fd560aa10..6964f86c69 100644
--- a/ui/ui_resources.target.darwin-arm.mk
+++ b/ui/ui_resources.target.darwin-arm.mk
@@ -18,7 +18,7 @@ $(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_local_pa
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from resources/ui_resources.grd ($@)"
$(hide)cd $(gyp_local_path)/ui; mkdir -p $(gyp_shared_intermediate_dir)/ui/ui_resources/grit $(gyp_shared_intermediate_dir)/ui/ui_resources; python ../tools/grit/grit.py -i resources/ui_resources.grd build -f ../tools/gritsettings/resource_ids -o "$(gyp_shared_intermediate_dir)/ui/ui_resources" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D use_concatenated_impulse_responses
diff --git a/ui/ui_resources.target.darwin-x86.mk b/ui/ui_resources.target.darwin-x86.mk
index 1fd560aa10..6964f86c69 100644
--- a/ui/ui_resources.target.darwin-x86.mk
+++ b/ui/ui_resources.target.darwin-x86.mk
@@ -18,7 +18,7 @@ $(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_local_pa
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from resources/ui_resources.grd ($@)"
$(hide)cd $(gyp_local_path)/ui; mkdir -p $(gyp_shared_intermediate_dir)/ui/ui_resources/grit $(gyp_shared_intermediate_dir)/ui/ui_resources; python ../tools/grit/grit.py -i resources/ui_resources.grd build -f ../tools/gritsettings/resource_ids -o "$(gyp_shared_intermediate_dir)/ui/ui_resources" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D use_concatenated_impulse_responses
diff --git a/ui/ui_resources.target.linux-arm.mk b/ui/ui_resources.target.linux-arm.mk
index 1fd560aa10..6964f86c69 100644
--- a/ui/ui_resources.target.linux-arm.mk
+++ b/ui/ui_resources.target.linux-arm.mk
@@ -18,7 +18,7 @@ $(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_local_pa
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from resources/ui_resources.grd ($@)"
$(hide)cd $(gyp_local_path)/ui; mkdir -p $(gyp_shared_intermediate_dir)/ui/ui_resources/grit $(gyp_shared_intermediate_dir)/ui/ui_resources; python ../tools/grit/grit.py -i resources/ui_resources.grd build -f ../tools/gritsettings/resource_ids -o "$(gyp_shared_intermediate_dir)/ui/ui_resources" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D use_concatenated_impulse_responses
diff --git a/ui/ui_resources.target.linux-x86.mk b/ui/ui_resources.target.linux-x86.mk
index 1fd560aa10..6964f86c69 100644
--- a/ui/ui_resources.target.linux-x86.mk
+++ b/ui/ui_resources.target.linux-x86.mk
@@ -18,7 +18,7 @@ $(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_local_pa
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/ui/ui_resources/grit/ui_resources.h: $(LOCAL_PATH)/tools/gritsettings/resource_ids $(LOCAL_PATH)/ui/resources/ui_resources.grd $(LOCAL_PATH)/ui/resources/default_100_percent/app_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_shadow_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_32.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/default_favicon_64.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/common/window_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_center.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_left_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/content_right_side.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_app_panel_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default.png $(LOCAL_PATH)/ui/resources/default_100_percent/frame_default_inactive.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-bar.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-left.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-border-right.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux-progress-value.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_close_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_maximize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_minimize_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_hover.png $(LOCAL_PATH)/ui/resources/default_100_percent/linux/linux_restore_pressed.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_bottom_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_left_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/panel_top_right_corner.png $(LOCAL_PATH)/ui/resources/default_100_percent/throbber.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_pointer_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/bubble_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_mask.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_2_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/close_dialog_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/blue_button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/browser_action_badge_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_focused_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/button_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkbox_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/checkmark.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/default_favicon.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_closed_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/folder_open_rtl.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/message_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_arrow_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_clear_all_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_close_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_expand_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_pause_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/notification_settings_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_checked_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_focused_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_inactive.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/radio_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/text_selection_handle.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_big_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_small_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_big_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_bubble_shadow_spike_small_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_active_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_bottom_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_left.png $(LOCAL_PATH)/ui/resources/default_200_percent/common/window_shadow_inactive_top_right.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_hover.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_normal.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/action_box_button_pressed.png $(LOCAL_PATH)/ui/resources/default_200_percent/cros/menu_droparrow.png $(LOCAL_PATH)/ui/resources/default_200_percent/throbber.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_140_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_hover_top_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_bottom_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_center.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_right.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_left.png $(LOCAL_PATH)/ui/resources/touch_180_percent/common/textbutton_pressed_top_right.png $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/clique_unittest.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/c_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/rc_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html_unittest.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/gather/txt_unittest.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grd_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/grit_runner_unittest.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/lazy_re_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/base_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/include_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/io_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/message_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/misc_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/structure_unittest.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/pseudo_unittest.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/tclib_unittest.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/build_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc_unittest.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb_unittest.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/util_unittest.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader_unittest.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from resources/ui_resources.grd ($@)"
$(hide)cd $(gyp_local_path)/ui; mkdir -p $(gyp_shared_intermediate_dir)/ui/ui_resources/grit $(gyp_shared_intermediate_dir)/ui/ui_resources; python ../tools/grit/grit.py -i resources/ui_resources.grd build -f ../tools/gritsettings/resource_ids -o "$(gyp_shared_intermediate_dir)/ui/ui_resources" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D use_concatenated_impulse_responses
diff --git a/ui/ui_unittests.gypi b/ui/ui_unittests.gypi
index a66dad6a4d..2d1e78c08e 100644
--- a/ui/ui_unittests.gypi
+++ b/ui/ui_unittests.gypi
@@ -19,6 +19,13 @@
'base/test/ui_cocoa_test_helper.mm',
'base/test/dummy_input_method.cc',
'base/test/dummy_input_method.h',
+ 'base/test/ui_controls.h',
+ 'base/test/ui_controls_aura.cc',
+ 'base/test/ui_controls_gtk.cc',
+ 'base/test/ui_controls_internal_win.cc',
+ 'base/test/ui_controls_internal_win.h',
+ 'base/test/ui_controls_mac.mm',
+ 'base/test/ui_controls_win.cc',
],
'include_dirs': [
'../',
@@ -36,6 +43,11 @@
'../skia/skia.gyp:skia',
],
}],
+ ['use_aura==1', {
+ 'sources!': [
+ 'base/test/ui_controls_win.cc',
+ ],
+ }],
],
},
{
@@ -58,13 +70,14 @@
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
- '../build/temp_gyp/googleurl.gyp:googleurl',
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libpng/libpng.gyp:libpng',
+ '../url/url.gyp:url_lib',
+ 'base/strings/ui_strings.gyp:ui_strings',
'run_ui_unittests',
'shell_dialogs',
'ui',
@@ -122,10 +135,12 @@
'base/clipboard/clipboard_unittest.cc',
'base/clipboard/custom_data_helper_unittest.cc',
'base/cocoa/base_view_unittest.mm',
+ 'base/cocoa/cocoa_event_utils_unittest.mm',
'base/cocoa/events_mac_unittest.mm',
'base/cocoa/focus_tracker_unittest.mm',
'base/cocoa/fullscreen_window_manager_unittest.mm',
'base/cocoa/hover_image_button_unittest.mm',
+ 'base/cocoa/menu_controller_unittest.mm',
'base/cocoa/tracking_area_unittest.mm',
'base/events/event_dispatcher_unittest.cc',
'base/events/event_unittest.cc',
@@ -137,6 +152,7 @@
'base/models/list_model_unittest.cc',
'base/models/list_selection_model_unittest.cc',
'base/models/tree_node_model_unittest.cc',
+ 'base/ozone/touch_event_converter_ozone_unittest.cc',
'base/test/data/resource.h',
'base/text/bytes_formatting_unittest.cc',
'base/text/utf16_indexing_unittest.cc',
diff --git a/ui/views/bubble/bubble_border.cc b/ui/views/bubble/bubble_border.cc
index 37a8eb1546..8b9a612627 100644
--- a/ui/views/bubble/bubble_border.cc
+++ b/ui/views/bubble/bubble_border.cc
@@ -158,11 +158,11 @@ gfx::Rect BubbleBorder::GetBounds(const gfx::Rect& anchor_rect,
std::max(images_->arrow_thickness + images_->border_interior_thickness,
images_->border_thickness);
if (is_arrow_on_horizontal(arrow_))
- size.ClampToMin(gfx::Size(min_with_arrow_width, min_with_arrow_thickness));
+ size.SetToMax(gfx::Size(min_with_arrow_width, min_with_arrow_thickness));
else if (has_arrow(arrow_))
- size.ClampToMin(gfx::Size(min_with_arrow_thickness, min_with_arrow_width));
+ size.SetToMax(gfx::Size(min_with_arrow_thickness, min_with_arrow_width));
else
- size.ClampToMin(gfx::Size(min, min));
+ size.SetToMax(gfx::Size(min, min));
int x = anchor_rect.x();
int y = anchor_rect.y();
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 050a408f59..7b011c549f 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -94,14 +94,18 @@ int BubbleFrameView::NonClientHitTest(const gfx::Point& point) {
return HTNOWHERE;
if (close_->visible() && close_->GetMirroredBounds().Contains(point))
return HTCLOSE;
- if (!GetWidget()->widget_delegate()->CanResize())
- return GetWidget()->client_view()->NonClientHitTest(point);
-
- const int size = bubble_border_->GetBorderThickness() + 4;
- const int hit = GetHTComponentForFrame(point, size, size, size, size, true);
- if (hit == HTNOWHERE && point.y() < title_->bounds().bottom())
- return HTCAPTION;
- return hit;
+
+ // Allow dialogs to show the system menu and be dragged.
+ if (GetWidget()->widget_delegate()->AsDialogDelegate()) {
+ gfx::Rect sys_rect(0, 0, title_->x(), title_->y());
+ sys_rect.set_origin(gfx::Point(GetMirroredXForRect(sys_rect), 0));
+ if (sys_rect.Contains(point))
+ return HTSYSMENU;
+ if (point.y() < title_->bounds().bottom())
+ return HTCAPTION;
+ }
+
+ return GetWidget()->client_view()->NonClientHitTest(point);
}
void BubbleFrameView::GetWindowMask(const gfx::Size& size,
@@ -141,12 +145,14 @@ gfx::Size BubbleFrameView::GetPreferredSize() {
const gfx::Size client(GetWidget()->client_view()->GetPreferredSize());
gfx::Size size(GetUpdatedWindowBounds(gfx::Rect(), client, false).size());
// Accommodate the width of the title bar elements.
- int title_bar_width = GetInsets().width() + border()->GetInsets().width() +
- kTitleLeftInset + title_->GetPreferredSize().width() +
- close_->width() + 1;
+ int title_bar_width = GetInsets().width() + border()->GetInsets().width();
+ if (!title_->text().empty())
+ title_bar_width += kTitleLeftInset + title_->GetPreferredSize().width();
+ if (close_->visible())
+ title_bar_width += close_->width() + 1;
if (titlebar_extra_view_ != NULL)
title_bar_width += titlebar_extra_view_->GetPreferredSize().width();
- size.ClampToMin(gfx::Size(title_bar_width, 0));
+ size.SetToMax(gfx::Size(title_bar_width, 0));
return size;
}
@@ -161,14 +167,14 @@ void BubbleFrameView::Layout() {
title_bounds.Inset(kTitleLeftInset, kTitleTopInset, 0, 0);
gfx::Size title_size(title_->GetPreferredSize());
const int title_width = std::max(0, close_->bounds().x() - title_bounds.x());
- title_size.ClampToMax(gfx::Size(title_width, title_size.height()));
+ title_size.SetToMin(gfx::Size(title_width, title_size.height()));
title_bounds.set_size(title_size);
title_->SetBoundsRect(title_bounds);
if (titlebar_extra_view_) {
const int extra_width = close_->bounds().x() - title_->bounds().right();
gfx::Size size = titlebar_extra_view_->GetPreferredSize();
- size.ClampToMax(gfx::Size(std::max(0, extra_width), size.height()));
+ size.SetToMin(gfx::Size(std::max(0, extra_width), size.height()));
gfx::Rect titlebar_extra_view_bounds(
bounds.right() - size.width(),
title_bounds.y(),
diff --git a/ui/views/bubble/bubble_frame_view_unittest.cc b/ui/views/bubble/bubble_frame_view_unittest.cc
index bcb853f10e..cf9f0983a1 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -17,40 +17,35 @@ typedef ViewsTestBase BubbleFrameViewTest;
namespace {
const BubbleBorder::Arrow kArrow = BubbleBorder::TOP_LEFT;
-const int kBubbleWidth = 200;
-const int kBubbleHeight = 200;
const SkColor kColor = SK_ColorRED;
const int kMargin = 6;
-class SizedBubbleDelegateView : public BubbleDelegateView {
+class TestBubbleDelegateView : public BubbleDelegateView {
public:
- SizedBubbleDelegateView(View* anchor_view);
- virtual ~SizedBubbleDelegateView();
+ explicit TestBubbleDelegateView(View* anchor_view)
+ : BubbleDelegateView(anchor_view, kArrow) {}
+ virtual ~TestBubbleDelegateView() {}
- // View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
+ // BubbleDelegateView overrides:
+ virtual gfx::Size GetPreferredSize() OVERRIDE { return gfx::Size(200, 200); }
- private:
- DISALLOW_COPY_AND_ASSIGN(SizedBubbleDelegateView);
+private:
+ DISALLOW_COPY_AND_ASSIGN(TestBubbleDelegateView);
};
-SizedBubbleDelegateView::SizedBubbleDelegateView(View* anchor_view)
- : BubbleDelegateView(anchor_view, BubbleBorder::TOP_LEFT) {
-}
-
-SizedBubbleDelegateView::~SizedBubbleDelegateView() {}
-
-gfx::Size SizedBubbleDelegateView::GetPreferredSize() {
- return gfx::Size(kBubbleWidth, kBubbleHeight);
-}
-
class TestBubbleFrameView : public BubbleFrameView {
public:
- TestBubbleFrameView();
- virtual ~TestBubbleFrameView();
-
- protected:
- virtual gfx::Rect GetMonitorBounds(const gfx::Rect& rect) OVERRIDE;
+ TestBubbleFrameView()
+ : BubbleFrameView(gfx::Insets(kMargin, kMargin, kMargin, kMargin)),
+ monitor_bounds_(gfx::Rect(0, 0, 1000, 1000)) {
+ SetBubbleBorder(new BubbleBorder(kArrow, BubbleBorder::NO_SHADOW, kColor));
+ }
+ virtual ~TestBubbleFrameView() {}
+
+ // BubbleDelegateView overrides:
+ virtual gfx::Rect GetMonitorBounds(const gfx::Rect& rect) OVERRIDE {
+ return monitor_bounds_;
+ }
private:
gfx::Rect monitor_bounds_;
@@ -58,18 +53,6 @@ class TestBubbleFrameView : public BubbleFrameView {
DISALLOW_COPY_AND_ASSIGN(TestBubbleFrameView);
};
-TestBubbleFrameView::TestBubbleFrameView()
- : BubbleFrameView(gfx::Insets(kMargin, kMargin, kMargin, kMargin)),
- monitor_bounds_(gfx::Rect(0, 0, 1000, 1000)) {
- SetBubbleBorder(new BubbleBorder(kArrow, BubbleBorder::NO_SHADOW, kColor));
-}
-
-TestBubbleFrameView::~TestBubbleFrameView() {}
-
-gfx::Rect TestBubbleFrameView::GetMonitorBounds(const gfx::Rect& rect) {
- return monitor_bounds_;
-}
-
} // namespace
TEST_F(BubbleFrameViewTest, GetBoundsForClientView) {
@@ -85,24 +68,35 @@ TEST_F(BubbleFrameViewTest, GetBoundsForClientView) {
}
TEST_F(BubbleFrameViewTest, NonClientHitTest) {
- // Create the anchor and parent widgets.
+ // Create the anchor view, its parent widget is needed on Aura.
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW);
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
scoped_ptr<Widget> anchor_widget(new Widget);
anchor_widget->Init(params);
anchor_widget->Show();
- BubbleDelegateView* delegate =
- new SizedBubbleDelegateView(anchor_widget->GetContentsView());
- Widget* widget(BubbleDelegateView::CreateBubble(delegate));
- widget->Show();
- gfx::Point kPtInBound(100, 100);
- gfx::Point kPtOutsideBound(1000, 1000);
- BubbleFrameView* bubble_frame_view = delegate->GetBubbleFrameView();
- EXPECT_EQ(HTCLIENT, bubble_frame_view->NonClientHitTest(kPtInBound));
- EXPECT_EQ(HTNOWHERE, bubble_frame_view->NonClientHitTest(kPtOutsideBound));
- widget->CloseNow();
- RunPendingMessages();
+ TestBubbleDelegateView* bubble =
+ new TestBubbleDelegateView(anchor_widget->GetContentsView());
+ BubbleDelegateView::CreateBubble(bubble);
+ BubbleFrameView* frame = bubble->GetBubbleFrameView();
+ const int border = frame->bubble_border()->GetBorderThickness();
+
+ struct {
+ const int point;
+ const int hit;
+ } cases[] = {
+ { border, HTNOWHERE },
+ { border + 5, HTNOWHERE },
+ { border + 6, HTCLIENT },
+ { border + 50, HTCLIENT },
+ { 1000, HTNOWHERE },
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ gfx::Point point(cases[i].point, cases[i].point);
+ EXPECT_EQ(cases[i].hit, frame->NonClientHitTest(point))
+ << " with border: " << border << ", at point " << cases[i].point;
+ }
}
// Tests that the arrow is mirrored as needed to better fit the screen.
diff --git a/ui/views/button_drag_utils.cc b/ui/views/button_drag_utils.cc
index c1b37b5dce..ccff0e99cf 100644
--- a/ui/views/button_drag_utils.cc
+++ b/ui/views/button_drag_utils.cc
@@ -4,7 +4,7 @@
#include "ui/views/button_drag_utils.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "grit/ui_resources.h"
#include "ui/base/dragdrop/drag_utils.h"
diff --git a/ui/views/color_chooser/color_chooser_view.cc b/ui/views/color_chooser/color_chooser_view.cc
index 99ae5eef38..59fb9911d9 100644
--- a/ui/views/color_chooser/color_chooser_view.cc
+++ b/ui/views/color_chooser/color_chooser_view.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/events/event.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/canvas.h"
diff --git a/ui/views/controls/button/blue_button.cc b/ui/views/controls/button/blue_button.cc
new file mode 100644
index 0000000000..a0384a9f3d
--- /dev/null
+++ b/ui/views/controls/button/blue_button.cc
@@ -0,0 +1,78 @@
+// Copyright 2013 The Chromium Authors. 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/controls/button/blue_button.h"
+
+#include "grit/ui_resources.h"
+#include "ui/base/accessibility/accessible_view_state.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/views/controls/button/label_button_border.h"
+
+namespace {
+
+const int kBlueNormalImages[] = IMAGE_GRID(IDR_BLUE_BUTTON_NORMAL);
+const int kBlueHoveredImages[] = IMAGE_GRID(IDR_BLUE_BUTTON_HOVER);
+const int kBluePressedImages[] = IMAGE_GRID(IDR_BLUE_BUTTON_PRESSED);
+const int kBlueFocusedNormalImages[] = IMAGE_GRID(
+ IDR_BLUE_BUTTON_FOCUSED_NORMAL);
+const int kBlueFocusedHoveredImages[] = IMAGE_GRID(
+ IDR_BLUE_BUTTON_FOCUSED_HOVER);
+const int kBlueFocusedPressedImages[] = IMAGE_GRID(
+ IDR_BLUE_BUTTON_FOCUSED_PRESSED);
+
+// Blue button style default font color.
+const SkColor kBlueButtonTextColor = SK_ColorWHITE;
+
+// Blue button style shadow color.
+const SkColor kBlueButtonShadowColor = SkColorSetRGB(0x53, 0x8C, 0xEA);
+
+} // namespace
+
+namespace views {
+
+// static
+const char BlueButton::kViewClassName[] = "views/BlueButton";
+
+BlueButton::BlueButton(ButtonListener* listener, const string16& text)
+ : LabelButton(listener, text) {
+ LabelButtonBorder* button_border = static_cast<LabelButtonBorder*>(border());
+
+ button_border->set_insets(gfx::Insets(9, 13, 9, 13));
+
+ button_border->SetPainter(false, STATE_NORMAL,
+ Painter::CreateImageGridPainter(kBlueNormalImages));
+ button_border->SetPainter(false, STATE_HOVERED,
+ Painter::CreateImageGridPainter(kBlueHoveredImages));
+ button_border->SetPainter(false, STATE_PRESSED,
+ Painter::CreateImageGridPainter(kBluePressedImages));
+ button_border->SetPainter(false, STATE_DISABLED,
+ Painter::CreateImageGridPainter(kBlueNormalImages));
+ button_border->SetPainter(true, STATE_NORMAL,
+ Painter::CreateImageGridPainter(kBlueFocusedNormalImages));
+ button_border->SetPainter(true, STATE_HOVERED,
+ Painter::CreateImageGridPainter(kBlueFocusedHoveredImages));
+ button_border->SetPainter(true, STATE_PRESSED,
+ Painter::CreateImageGridPainter(kBlueFocusedPressedImages));
+ button_border->SetPainter(true, STATE_DISABLED,
+ Painter::CreateImageGridPainter(kBlueNormalImages));
+
+ for (size_t state = STATE_NORMAL; state < STATE_COUNT; ++state)
+ SetTextColor(static_cast<ButtonState>(state), kBlueButtonTextColor);
+ label()->SetShadowColors(kBlueButtonShadowColor, kBlueButtonShadowColor);
+ label()->SetShadowOffset(0, 1);
+}
+
+BlueButton::~BlueButton() {}
+
+const char* BlueButton::GetClassName() const {
+ return BlueButton::kViewClassName;
+}
+
+// TODO(msw): Re-enable animations for blue buttons. It's disabled now due
+// to crbug.com/239121.
+const ui::Animation* BlueButton::GetThemeAnimation() const {
+ return NULL;
+}
+
+} // namespace views
diff --git a/ui/views/controls/button/blue_button.h b/ui/views/controls/button/blue_button.h
new file mode 100644
index 0000000000..09bc9d0f26
--- /dev/null
+++ b/ui/views/controls/button/blue_button.h
@@ -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.
+
+#ifndef UI_VIEWS_CONTROLS_BUTTON_BLUE_BUTTON_H_
+#define UI_VIEWS_CONTROLS_BUTTON_BLUE_BUTTON_H_
+
+#include "base/compiler_specific.h"
+#include "base/string16.h"
+#include "ui/views/controls/button/label_button.h"
+
+namespace views {
+
+// A class representing a blue button.
+class VIEWS_EXPORT BlueButton : public LabelButton {
+ public:
+ static const char kViewClassName[];
+
+ BlueButton(ButtonListener* listener, const base::string16& text);
+ virtual ~BlueButton();
+
+ private:
+ // Overridden from LabelButton:
+ virtual const char* GetClassName() const OVERRIDE;
+ virtual const ui::Animation* GetThemeAnimation() const OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(BlueButton);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_CONTROLS_BUTTON_BLUE_BUTTON_H_
diff --git a/ui/views/controls/button/button.cc b/ui/views/controls/button/button.cc
index f99f06c20d..eccec03ab5 100644
--- a/ui/views/controls/button/button.cc
+++ b/ui/views/controls/button/button.cc
@@ -4,7 +4,7 @@
#include "ui/views/controls/button/button.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
namespace views {
diff --git a/ui/views/controls/button/button.h b/ui/views/controls/button/button.h
index 0b209abf15..d038015f87 100644
--- a/ui/views/controls/button/button.h
+++ b/ui/views/controls/button/button.h
@@ -38,7 +38,7 @@ class VIEWS_EXPORT Button : public View {
};
// Button styles with associated images and border painters.
- // TODO(msw): Add "Blue Button", Menu, ComboBox, etc.
+ // TODO(msw): Add Menu, ComboBox, etc.
enum ButtonStyle {
STYLE_BUTTON = 0,
STYLE_TEXTBUTTON,
diff --git a/ui/views/controls/button/button_dropdown.cc b/ui/views/controls/button/button_dropdown.cc
index cfab435421..a243cee191 100644
--- a/ui/views/controls/button/button_dropdown.cc
+++ b/ui/views/controls/button/button_dropdown.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ui/views/controls/button/image_button.cc b/ui/views/controls/button/image_button.cc
index df74249b43..ff355ebd68 100644
--- a/ui/views/controls/button/image_button.cc
+++ b/ui/views/controls/button/image_button.cc
@@ -4,7 +4,7 @@
#include "ui/views/controls/button/image_button.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index aca2427aaf..6014bdc9cf 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -174,12 +174,12 @@ gfx::Size LabelButton::GetPreferredSize() {
gfx::Size size(label.GetPreferredSize());
if (image_width > 0 && size.width() > 0)
size.Enlarge(kSpacing, 0);
- size.ClampToMin(gfx::Size(0, image_size.height()));
+ size.SetToMax(gfx::Size(0, image_size.height()));
const gfx::Insets insets(GetInsets());
size.Enlarge(image_size.width() + insets.width(), insets.height());
// Increase the minimum size monotonically with the preferred size.
- size.ClampToMin(min_size_);
+ size.SetToMax(min_size_);
min_size_ = size;
// Return the largest known size clamped to the maximum size (if valid).
diff --git a/ui/views/controls/button/label_button_unittest.cc b/ui/views/controls/button/label_button_unittest.cc
index 0cc8b27cb1..fe2d1f670c 100644
--- a/ui/views/controls/button/label_button_unittest.cc
+++ b/ui/views/controls/button/label_button_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index 4a895529da..765c9ef584 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -4,7 +4,7 @@
#include "ui/views/controls/button/menu_button.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "grit/ui_strings.h"
#include "ui/base/accessibility/accessible_view_state.h"
diff --git a/ui/views/controls/button/text_button.cc b/ui/views/controls/button/text_button.cc
index a04d374028..aba3941136 100644
--- a/ui/views/controls/button/text_button.cc
+++ b/ui/views/controls/button/text_button.cc
@@ -118,18 +118,24 @@ TextButtonDefaultBorder::~TextButtonDefaultBorder() {
void TextButtonDefaultBorder::Paint(const View& view, gfx::Canvas* canvas) {
const TextButton* button = static_cast<const TextButton*>(&view);
int state = button->state();
+ bool animating = button->GetAnimation()->is_animating();
Painter* painter = normal_painter_.get();
+ // Use the hot painter when we're hovered. Also use the hot painter when we're
+ // STATE_NORMAL and |animating| so that we show throb animations started from
+ // CustomButton::StartThrobbing which should start throbbing the button
+ // regardless of whether it is hovered.
if (button->show_multiple_icon_states() &&
((state == TextButton::STATE_HOVERED) ||
- (state == TextButton::STATE_PRESSED))) {
- painter = (state == TextButton::STATE_HOVERED) ?
- hot_painter_.get() : pushed_painter_.get();
+ (state == TextButton::STATE_PRESSED) ||
+ ((state == TextButton::STATE_NORMAL) && animating))) {
+ painter = (state == TextButton::STATE_PRESSED) ?
+ pushed_painter_.get() : hot_painter_.get();
}
if (painter) {
- if (button->GetAnimation()->is_animating()) {
+ if (animating) {
// TODO(pkasting): Really this should crossfade between states so it could
- // handle the case of having a non-NULL |normal_set_|.
+ // handle the case of having a non-NULL |normal_painter_|.
canvas->SaveLayerAlpha(static_cast<uint8>(
button->GetAnimation()->CurrentValueBetween(0, 255)));
painter->Paint(canvas, view.size());
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 8711978902..7a9a91dea7 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/combobox/combobox.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/events/event.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/ui/views/controls/combobox/native_combobox_views_unittest.cc b/ui/views/controls/combobox/native_combobox_views_unittest.cc
index 0fe8bbb99d..b580e96849 100644
--- a/ui/views/controls/combobox/native_combobox_views_unittest.cc
+++ b/ui/views/controls/combobox/native_combobox_views_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/events/event.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/models/combobox_model.h"
diff --git a/ui/views/controls/combobox/native_combobox_win.cc b/ui/views/controls/combobox/native_combobox_win.cc
index 44242857d4..3093c53bc2 100644
--- a/ui/views/controls/combobox/native_combobox_win.cc
+++ b/ui/views/controls/combobox/native_combobox_win.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/combobox/native_combobox_win.h"
#include "base/i18n/rtl.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/events/event.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/ui/views/controls/image_view.cc b/ui/views/controls/image_view.cc
index d27685b2d5..489f970aa5 100644
--- a/ui/views/controls/image_view.cc
+++ b/ui/views/controls/image_view.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/image_view.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/gfx/canvas.h"
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 0319e25c45..c8c3c57144 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -13,7 +13,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/text/text_elider.h"
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index c14bd6111f..134a05d7ee 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/i18n/rtl.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
index 6ea7412455..fcb73f10f1 100644
--- a/ui/views/controls/link.cc
+++ b/ui/views/controls/link.cc
@@ -7,7 +7,7 @@
#include "build/build_config.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/events/event.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 8f6ecf53d9..86cd597fe3 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -7,8 +7,8 @@
#include "base/i18n/case_conversion.h"
#include "base/i18n/rtl.h"
#include "base/run_loop.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
#include "ui/base/dragdrop/drag_utils.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/events/event_constants.h"
diff --git a/ui/views/controls/menu/menu_delegate.h b/ui/views/controls/menu/menu_delegate.h
index 3f9fd44606..ebce831e18 100644
--- a/ui/views/controls/menu/menu_delegate.h
+++ b/ui/views/controls/menu/menu_delegate.h
@@ -165,11 +165,11 @@ class VIEWS_EXPORT MenuDelegate {
const ui::DropTargetEvent& event,
DropPosition* position);
- // Invoked to perform the drop operation. This is ONLY invoked if
- // canDrop returned true for the parent menu item, and GetDropOperation
- // returned an operation other than ui::DragDropTypes::DRAG_NONE.
+ // Invoked to perform the drop operation. This is ONLY invoked if CanDrop()
+ // returned true for the parent menu item, and GetDropOperation() returned an
+ // operation other than ui::DragDropTypes::DRAG_NONE.
//
- // menu indicates the menu the drop occurred on.
+ // |menu| is the menu the drop occurred on.
virtual int OnPerformDrop(MenuItemView* menu,
DropPosition position,
const ui::DropTargetEvent& event);
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index 38b6404ea2..a8752a2316 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -6,7 +6,7 @@
#include "base/i18n/case_conversion.h"
#include "base/stl_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "grit/ui_strings.h"
#include "ui/base/accessibility/accessible_view_state.h"
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
index d60dd31840..2e9eba1c38 100644
--- a/ui/views/controls/menu/menu_item_view.h
+++ b/ui/views/controls/menu/menu_item_view.h
@@ -167,9 +167,8 @@ class VIEWS_EXPORT MenuItemView : public View {
Type type,
ui::MenuSeparatorType separator_style);
- // Remove an item from the menu at a specified index.
- // ChildrenChanged() should be called after removing menu items (whether
- // the menu may be active or not).
+ // Remove an item from the menu at a specified index. The removed MenuItemView
+ // is deleted when ChildrenChanged() is invoked.
void RemoveMenuItemAt(int index);
// Appends an item to this menu.
diff --git a/ui/views/controls/menu/menu_model_adapter_unittest.cc b/ui/views/controls/menu/menu_model_adapter_unittest.cc
index e46a56ee50..6ce3a37627 100644
--- a/ui/views/controls/menu/menu_model_adapter_unittest.cc
+++ b/ui/views/controls/menu/menu_model_adapter_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/models/menu_model_delegate.h"
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
index 1e8256e941..604187bd36 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -343,10 +343,11 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
}
if ((types & MenuRunner::CONTEXT_MENU) &&
parent &&
- parent->GetCurrentEvent() &&
- !MenuItemView::IsBubble(anchor))
- anchor = parent->GetCurrentEvent()->IsGestureEvent() ?
- MenuItemView::BOTTOMCENTER : MenuItemView::TOPLEFT;
+ !MenuItemView::IsBubble(anchor)) {
+ const ui::Event* current_event = parent->GetCurrentEvent();
+ anchor = current_event && current_event->IsMouseEvent() ?
+ MenuItemView::TOPLEFT : MenuItemView::BOTTOMCENTER;
+ }
return holder_->RunMenuAt(parent, button, bounds, anchor, types);
}
diff --git a/ui/views/controls/message_box_view.cc b/ui/views/controls/message_box_view.cc
index ff7074bde2..4ee81c3bbf 100644
--- a/ui/views/controls/message_box_view.cc
+++ b/ui/views/controls/message_box_view.cc
@@ -7,8 +7,9 @@
#include "base/i18n/rtl.h"
#include "base/message_loop.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
+#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/image_view.h"
@@ -66,8 +67,7 @@ MessageBoxView::InitParams::InitParams(const string16& message)
: options(NO_OPTIONS),
message(message),
message_width(kDefaultMessageWidth),
- inter_row_vertical_spacing(kRelatedControlVerticalSpacing),
- clipboard_source_tag() {}
+ inter_row_vertical_spacing(kRelatedControlVerticalSpacing) {}
MessageBoxView::InitParams::~InitParams() {
}
@@ -141,9 +141,7 @@ bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) {
if (!clipboard)
return false;
- ui::ScopedClipboardWriter scw(clipboard,
- ui::Clipboard::BUFFER_STANDARD,
- source_tag_);
+ ui::ScopedClipboardWriter scw(clipboard, ui::Clipboard::BUFFER_STANDARD);
string16 text = message_labels_[0]->text();
for (size_t i = 1; i < message_labels_.size(); ++i)
text += message_labels_[i]->text();
@@ -189,7 +187,6 @@ void MessageBoxView::Init(const InitParams& params) {
}
inter_row_vertical_spacing_ = params.inter_row_vertical_spacing;
- source_tag_ = params.clipboard_source_tag;
ResetLayoutManager();
}
diff --git a/ui/views/controls/message_box_view.h b/ui/views/controls/message_box_view.h
index 45a692ebce..db80767d16 100644
--- a/ui/views/controls/message_box_view.h
+++ b/ui/views/controls/message_box_view.h
@@ -8,7 +8,6 @@
#include <vector>
#include "base/string16.h"
-#include "ui/base/clipboard/clipboard.h"
#include "ui/views/view.h"
namespace gfx {
@@ -49,7 +48,6 @@ class VIEWS_EXPORT MessageBoxView : public View {
string16 default_prompt;
int message_width;
int inter_row_vertical_spacing;
- ui::SourceTag clipboard_source_tag;
};
explicit MessageBoxView(const InitParams& params);
@@ -115,9 +113,6 @@ class VIEWS_EXPORT MessageBoxView : public View {
// Spacing between rows in the grid layout.
int inter_row_vertical_spacing_;
- // Source tag to be written to the clipboard when Ctrl-C pressed.
- ui::SourceTag source_tag_;
-
DISALLOW_COPY_AND_ASSIGN(MessageBoxView);
};
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index fb8a725bc5..3a3ed14f80 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -8,6 +8,7 @@
#include "ui/aura/focus_manager.h"
#include "ui/aura/window.h"
#include "ui/views/controls/native/native_view_host.h"
+#include "ui/views/view_constants_aura.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -18,18 +19,23 @@ NativeViewHostAura::NativeViewHostAura(NativeViewHost* host)
}
NativeViewHostAura::~NativeViewHostAura() {
- if (host_->native_view())
+ if (host_->native_view()) {
+ host_->native_view()->ClearProperty(views::kHostViewKey);
host_->native_view()->RemoveObserver(this);
+ }
}
////////////////////////////////////////////////////////////////////////////////
// NativeViewHostAura, NativeViewHostWrapper implementation:
void NativeViewHostAura::NativeViewWillAttach() {
host_->native_view()->AddObserver(this);
+ host_->native_view()->SetProperty(views::kHostViewKey,
+ static_cast<View*>(host_));
}
void NativeViewHostAura::NativeViewDetaching(bool destroyed) {
if (!destroyed) {
+ host_->native_view()->ClearProperty(views::kHostViewKey);
host_->native_view()->RemoveObserver(this);
host_->native_view()->Hide();
if (host_->native_view()->parent())
diff --git a/ui/views/controls/native/native_view_host_aura_unittest.cc b/ui/views/controls/native/native_view_host_aura_unittest.cc
index 30999326b6..7653cc905c 100644
--- a/ui/views/controls/native/native_view_host_aura_unittest.cc
+++ b/ui/views/controls/native/native_view_host_aura_unittest.cc
@@ -10,6 +10,7 @@
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
+#include "ui/views/view_constants_aura.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -23,6 +24,10 @@ class NativeViewHostAuraTest : public ViewsTestBase {
return static_cast<NativeViewHostAura*>(host_->native_wrapper_.get());
}
+ NativeViewHost* host() {
+ return host_.get();
+ }
+
Widget* child() {
return child_.get();
}
@@ -73,4 +78,21 @@ TEST_F(NativeViewHostAuraTest, StopObservingNativeViewOnDestruct) {
EXPECT_FALSE(child_win->HasObserver(aura_host));
}
+// Tests that the kHostViewKey is correctly set and cleared.
+TEST_F(NativeViewHostAuraTest, HostViewPropertyKey) {
+ // Create the NativeViewHost and attach a NativeView.
+ CreateHost();
+ aura::Window* child_win = child()->GetNativeView();
+ EXPECT_EQ(host(), child_win->GetProperty(views::kHostViewKey));
+
+ host()->Detach();
+ EXPECT_FALSE(child_win->GetProperty(views::kHostViewKey));
+
+ host()->Attach(child_win);
+ EXPECT_EQ(host(), child_win->GetProperty(views::kHostViewKey));
+
+ DestroyHost();
+ EXPECT_FALSE(child_win->GetProperty(views::kHostViewKey));
+}
+
} // namespace views
diff --git a/ui/views/controls/progress_bar_unittest.cc b/ui/views/controls/progress_bar_unittest.cc
index eb41092f9d..78df2e17d0 100644
--- a/ui/views/controls/progress_bar_unittest.cc
+++ b/ui/views/controls/progress_bar_unittest.cc
@@ -4,7 +4,7 @@
#include "ui/views/controls/progress_bar.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/accessibility/accessible_view_state.h"
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
index 041e9fd70d..ff286fdcc3 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "grit/ui_strings.h"
#include "ui/base/events/event.h"
@@ -40,6 +40,7 @@ BaseScrollBar::BaseScrollBar(bool horizontal, BaseScrollBarThumb* thumb)
thumb_(thumb),
contents_size_(0),
contents_scroll_offset_(0),
+ viewport_size_(0),
thumb_track_state_(CustomButton::STATE_NORMAL),
last_scroll_amount_(SCROLL_NONE),
repeater_(base::Bind(&BaseScrollBar::TrackClicked,
@@ -383,6 +384,8 @@ void BaseScrollBar::Update(int viewport_size, int content_size,
// calculations throughout this code.
contents_size_ = std::max(1, content_size);
+ viewport_size_ = std::max(1, viewport_size);
+
if (content_size < 0)
content_size = 0;
if (contents_scroll_offset < 0)
@@ -427,6 +430,10 @@ int BaseScrollBar::GetScrollIncrement(bool is_page, bool is_positive) {
///////////////////////////////////////////////////////////////////////////////
// BaseScrollBar, private:
+int BaseScrollBar::GetThumbSizeForTest() {
+ return thumb_->GetSize();
+}
+
void BaseScrollBar::ProcessPressEvent(const ui::LocatedEvent& event) {
SetThumbTrackState(CustomButton::STATE_PRESSED);
gfx::Rect thumb_bounds = thumb_->bounds();
@@ -468,6 +475,13 @@ int BaseScrollBar::GetTrackSize() const {
}
int BaseScrollBar::CalculateThumbPosition(int contents_scroll_offset) const {
+ // In some combination of viewport_size and contents_size_, the result of
+ // simple division can be rounded and there could be 1 pixel gap even when the
+ // contents scroll down to the bottom. See crbug.com/244671
+ if (contents_scroll_offset + viewport_size_ == contents_size_) {
+ int track_size = GetTrackSize();
+ return track_size - (viewport_size_ * GetTrackSize() / contents_size_);
+ }
return (contents_scroll_offset * GetTrackSize()) / contents_size_;
}
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.h b/ui/views/controls/scrollbar/base_scroll_bar.h
index d9add2fb48..a62c3d8409 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.h
+++ b/ui/views/controls/scrollbar/base_scroll_bar.h
@@ -5,6 +5,7 @@
#ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
#define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
+#include "base/gtest_prod_util.h"
#include "ui/views/animation/scroll_animator.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/button/image_button.h"
@@ -111,6 +112,9 @@ class VIEWS_EXPORT BaseScrollBar : public ScrollBar,
virtual int GetScrollIncrement(bool is_page, bool is_positive);
private:
+ FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, ScrollBarFitsToBottom);
+ int GetThumbSizeForTest();
+
// Changes to 'pushed' state and starts a timer to scroll repeatedly.
void ProcessPressEvent(const ui::LocatedEvent& event);
@@ -149,6 +153,9 @@ class VIEWS_EXPORT BaseScrollBar : public ScrollBar,
// The current amount the contents is offset by in the viewport.
int contents_scroll_offset_;
+ // The current size of the view port, in pixels.
+ int viewport_size_;
+
// The state of the scrollbar track. Typically, the track will highlight when
// the user presses the mouse on them (during page scrolling).
CustomButton::ButtonState thumb_track_state_;
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
index 1f0f1bb662..714f62ecb3 100644
--- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "grit/ui_strings.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/ui/views/controls/scrollbar/kennedy_scroll_bar.cc b/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
index 2998374752..f263068ecd 100644
--- a/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/kennedy_scroll_bar.cc
@@ -68,7 +68,7 @@ KennedyScrollBar::~KennedyScrollBar() {
gfx::Rect KennedyScrollBar::GetTrackBounds() const {
gfx::Rect local_bounds(GetLocalBounds());
gfx::Size track_size = local_bounds.size();
- track_size.ClampToMin(GetThumb()->size());
+ track_size.SetToMax(GetThumb()->size());
local_bounds.set_size(track_size);
return local_bounds;
}
diff --git a/ui/views/controls/scrollbar/scrollbar_unittest.cc b/ui/views/controls/scrollbar/scrollbar_unittest.cc
index 41c119e55c..1f20823c9b 100644
--- a/ui/views/controls/scrollbar/scrollbar_unittest.cc
+++ b/ui/views/controls/scrollbar/scrollbar_unittest.cc
@@ -103,10 +103,14 @@ class NativeScrollBarTest : public ViewsTestBase {
// TODO(dnicoara) Can't run the test on Windows since the scrollbar |Part|
// isn't handled in NativeTheme.
#if defined(OS_WIN)
-TEST_F(NativeScrollBarTest, DISABLED_Scrolling) {
+#define MAYBE_Scrolling DISABLED_Scrolling
+#define MAYBE_ScrollBarFitsToBottom DISABLED_ScrollBarFitsToBottom
#else
-TEST_F(NativeScrollBarTest, Scrolling) {
+#define MAYBE_Scrolling Scrolling
+#define MAYBE_ScrollBarFitsToBottom ScrollBarFitsToBottom
#endif
+
+TEST_F(NativeScrollBarTest, MAYBE_Scrolling) {
EXPECT_EQ(scrollbar_->GetPosition(), 0);
EXPECT_EQ(scrollbar_->GetMaxPosition(), 100);
EXPECT_EQ(scrollbar_->GetMinPosition(), 0);
@@ -144,4 +148,16 @@ TEST_F(NativeScrollBarTest, Scrolling) {
EXPECT_EQ(controller_->last_position, 0);
}
+TEST_F(NativeScrollBarTest, MAYBE_ScrollBarFitsToBottom) {
+ scrollbar_->Update(100, 199, 0);
+ EXPECT_EQ(0, scrollbar_->GetPosition());
+ EXPECT_EQ(99, scrollbar_->GetMaxPosition());
+ EXPECT_EQ(0, scrollbar_->GetMinPosition());
+
+ scrollbar_->Update(100, 199, 99);
+ EXPECT_EQ(
+ scrollbar_->GetTrackBounds().width() - scrollbar_->GetThumbSizeForTest(),
+ scrollbar_->GetPosition());
+}
+
} // namespace views
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 8be3c92579..47e8f395b1 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
diff --git a/ui/views/controls/slider_unittest.cc b/ui/views/controls/slider_unittest.cc
index 5545a26731..be5eb917b6 100644
--- a/ui/views/controls/slider_unittest.cc
+++ b/ui/views/controls/slider_unittest.cc
@@ -6,7 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/ui/views/controls/styled_label_unittest.cc b/ui/views/controls/styled_label_unittest.cc
index fa86675f94..ecd2955c82 100644
--- a/ui/views/controls/styled_label_unittest.cc
+++ b/ui/views/controls/styled_label_unittest.cc
@@ -6,7 +6,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/link.h"
#include "ui/views/controls/styled_label.h"
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc
index d234408da5..1dbdea6168 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc
@@ -308,7 +308,7 @@ void TabbedPane::SelectTab(Tab* tab) {
gfx::Size TabbedPane::GetPreferredSize() {
gfx::Size size;
for (int i = 0; i < contents_->child_count(); ++i)
- size.ClampToMin(contents_->child_at(i)->GetPreferredSize());
+ size.SetToMax(contents_->child_at(i)->GetPreferredSize());
size.Enlarge(0, tab_strip_->GetPreferredSize().height());
return size;
}
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
index ce7525bef8..c99d0f97b1 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/message_loop.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/message_loop.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/tabbed_pane/tabbed_pane.h"
#include "ui/views/test/views_test_base.h"
diff --git a/ui/views/controls/table/table_view_unittest.cc b/ui/views/controls/table/table_view_unittest.cc
index c19674bc4b..81e25dba2b 100644
--- a/ui/views/controls/table/table_view_unittest.cc
+++ b/ui/views/controls/table/table_view_unittest.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/table/table_view.h"
#include "base/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/table/table_grouper.h"
#include "ui/views/controls/table/table_header.h"
diff --git a/ui/views/controls/table/test_table_model.cc b/ui/views/controls/table/test_table_model.cc
index 43423bbceb..c83dd88b21 100644
--- a/ui/views/controls/table/test_table_model.cc
+++ b/ui/views/controls/table/test_table_model.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/table/test_table_model.h"
#include "base/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/gfx/image/image_skia.h"
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index 5da334dcef..f8ecb491e8 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -12,7 +12,7 @@
#include "base/i18n/case_conversion.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/app_locale_settings.h"
#include "grit/ui_strings.h"
#include "third_party/icu/public/common/unicode/uchar.h"
@@ -952,6 +952,20 @@ void NativeTextfieldViews::InsertChar(char16 ch, int flags) {
UpdateAfterChange(true, true);
OnAfterUserAction();
+
+ if (textfield_->IsObscured()) {
+ const base::TimeDelta& reveal_duration =
+ textfield_->obscured_reveal_duration();
+ if (reveal_duration != base::TimeDelta()) {
+ const size_t change_offset = model_->GetCursorPosition();
+ DCHECK_GT(change_offset, 0u);
+ RevealObscuredChar(change_offset - 1, reveal_duration);
+ }
+ }
+}
+
+gfx::NativeWindow NativeTextfieldViews::GetAttachedWindow() const {
+ return GetWidget()->GetNativeWindow();
}
ui::TextInputType NativeTextfieldViews::GetTextInputType() const {
@@ -1397,13 +1411,9 @@ bool NativeTextfieldViews::Paste() {
string16 new_text = GetTextForDisplay(GetText());
model_->SetText(new_text);
- // Calls TextfieldController::ContentsChanged() explicitly if the paste
- // action did not change the content at all. See http://crbug.com/79002
- if (new_text == original_text) {
- TextfieldController* controller = textfield_->GetController();
- if (controller)
- controller->ContentsChanged(textfield_, textfield_->text());
- }
+ TextfieldController* controller = textfield_->GetController();
+ if (controller)
+ controller->OnAfterPaste();
}
return success;
}
@@ -1483,9 +1493,23 @@ void NativeTextfieldViews::CreateTouchSelectionControllerAndNotifyIt() {
void NativeTextfieldViews::PlatformGestureEventHandling(
const ui::GestureEvent* event) {
#if defined(OS_WIN) && defined(USE_AURA)
- if (event->type() == ui::ET_GESTURE_TAP_DOWN && !textfield_->read_only())
+ if (event->type() == ui::ET_GESTURE_TAP && !textfield_->read_only())
base::win::DisplayVirtualKeyboard();
#endif
}
+void NativeTextfieldViews::RevealObscuredChar(int index,
+ const base::TimeDelta& duration) {
+ GetRenderText()->SetObscuredRevealIndex(index);
+ SchedulePaint();
+
+ if (index != -1) {
+ obscured_reveal_timer_.Start(
+ FROM_HERE,
+ duration,
+ base::Bind(&NativeTextfieldViews::RevealObscuredChar,
+ base::Unretained(this), -1, base::TimeDelta()));
+ }
+}
+
} // namespace views
diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h
index 6af5478f39..47d58f8e12 100644
--- a/ui/views/controls/textfield/native_textfield_views.h
+++ b/ui/views/controls/textfield/native_textfield_views.h
@@ -7,6 +7,7 @@
#include "base/memory/weak_ptr.h"
#include "base/string16.h"
+#include "base/timer.h"
#include "ui/base/events/event_constants.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/base/models/simple_menu_model.h"
@@ -182,6 +183,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public View,
virtual void ClearCompositionText() OVERRIDE;
virtual void InsertText(const string16& text) OVERRIDE;
virtual void InsertChar(char16 ch, int flags) OVERRIDE;
+ virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
virtual ui::TextInputType GetTextInputType() const OVERRIDE;
virtual bool CanComposeInline() const OVERRIDE;
virtual gfx::Rect GetCaretBounds() OVERRIDE;
@@ -286,6 +288,10 @@ class VIEWS_EXPORT NativeTextfieldViews : public View,
// Platform specific gesture event handling.
void PlatformGestureEventHandling(const ui::GestureEvent* event);
+ // Reveals the obscured char at |index| for the given |duration|. If |index|
+ // is -1, existing revealed index will be cleared.
+ void RevealObscuredChar(int index, const base::TimeDelta& duration);
+
// The parent textfield, the owner of this object.
Textfield* textfield_;
@@ -327,6 +333,11 @@ class VIEWS_EXPORT NativeTextfieldViews : public View,
scoped_ptr<ui::TouchSelectionController> touch_selection_controller_;
+ // A timer to control the duration of showing the last typed char in
+ // obscured text. When the timer is running, the last typed char is shown
+ // and when the time expires, the last typed char is obscured.
+ base::OneShotTimer<NativeTextfieldViews> obscured_reveal_timer_;
+
DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews);
};
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index dd10ff77b4..0a1b0773be 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -14,7 +14,7 @@
#include "base/message_loop.h"
#include "base/pickle.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "grit/ui_strings.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc
index 8a139ccf3d..b5c0c3729e 100644
--- a/ui/views/controls/textfield/native_textfield_win.cc
+++ b/ui/views/controls/textfield/native_textfield_win.cc
@@ -9,7 +9,7 @@
#include "base/i18n/case_conversion.h"
#include "base/i18n/rtl.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/metro.h"
#include "base/win/windows_version.h"
#include "grit/ui_strings.h"
@@ -633,8 +633,9 @@ void NativeTextfieldWin::OnCopy() {
const string16 text(GetSelectedText());
if (!text.empty()) {
- ui::ScopedClipboardWriter(ui::Clipboard::GetForCurrentThread(),
- ui::Clipboard::BUFFER_STANDARD).WriteText(text);
+ ui::ScopedClipboardWriter(
+ ui::Clipboard::GetForCurrentThread(),
+ ui::Clipboard::BUFFER_STANDARD).WriteText(text);
if (TextfieldController* controller = textfield_->GetController())
controller->OnAfterCutOrCopy();
}
@@ -1062,6 +1063,8 @@ void NativeTextfieldWin::OnPaste() {
textfield_->SyncText();
text_before_change_.clear();
ReplaceSel(collapsed.c_str(), true);
+ if (TextfieldController* controller = textfield_->GetController())
+ controller->OnAfterPaste();
}
}
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index b0ecd2d21b..adc9ec618a 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -8,7 +8,7 @@
#include "base/command_line.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/events/event.h"
#include "ui/base/ime/text_input_type.h"
@@ -25,6 +25,7 @@
#include "ui/views/controls/textfield/native_textfield_views.h"
#include "ui/views/controls/textfield/native_textfield_wrapper.h"
#include "ui/views/controls/textfield/textfield_controller.h"
+#include "ui/views/views_delegate.h"
#include "ui/views/widget/widget.h"
#if defined(OS_WIN)
@@ -89,6 +90,11 @@ Textfield::Textfield()
icon_view_(NULL),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {
set_focusable(true);
+
+ if (ViewsDelegate::views_delegate) {
+ obscured_reveal_duration_ = ViewsDelegate::views_delegate->
+ GetDefaultTextfieldObscuredRevealDuration();
+ }
}
Textfield::Textfield(StyleFlags style)
@@ -114,6 +120,11 @@ Textfield::Textfield(StyleFlags style)
set_focusable(true);
if (IsObscured())
SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
+
+ if (ViewsDelegate::views_delegate) {
+ obscured_reveal_duration_ = ViewsDelegate::views_delegate->
+ GetDefaultTextfieldObscuredRevealDuration();
+ }
}
Textfield::~Textfield() {
@@ -153,7 +164,6 @@ void Textfield::SetObscured(bool obscured) {
native_wrapper_->UpdateIsObscured();
}
-
ui::TextInputType Textfield::GetTextInputType() const {
if (read_only() || !enabled())
return ui::TEXT_INPUT_TYPE_NONE;
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 417850077d..902f12196d 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/string16.h"
+#include "base/time.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ime/text_input_type.h"
@@ -42,7 +43,7 @@ class TextfieldController;
// This class implements a View that wraps a native text (edit) field.
class VIEWS_EXPORT Textfield : public View {
public:
- // The button's class name.
+ // The textfield's class name.
static const char kViewClassName[];
enum StyleFlags {
@@ -71,6 +72,17 @@ class VIEWS_EXPORT Textfield : public View {
bool IsObscured() const;
void SetObscured(bool obscured);
+ // Gets/sets the duration to reveal the last typed char when the obscured bit
+ // is set. A duration of zero effectively disables the feature. Other values
+ // cause the last typed char to be shown for the defined duration. Note this
+ // only works with NativeTextfieldViews.
+ const base::TimeDelta& obscured_reveal_duration() const {
+ return obscured_reveal_duration_;
+ }
+ void set_obscured_reveal_duration(const base::TimeDelta& duration) {
+ obscured_reveal_duration_ = duration;
+ }
+
// Gets/Sets the input type of this textfield.
ui::TextInputType GetTextInputType() const;
void SetTextInputType(ui::TextInputType type);
@@ -351,6 +363,9 @@ class VIEWS_EXPORT Textfield : public View {
// The input type of this text field.
ui::TextInputType text_input_type_;
+ // The duration to reveal the last typed char for obscured textfields.
+ base::TimeDelta obscured_reveal_duration_;
+
DISALLOW_COPY_AND_ASSIGN(Textfield);
};
diff --git a/ui/views/controls/textfield/textfield_controller.cc b/ui/views/controls/textfield/textfield_controller.cc
index cb3ed19bdd..d9899d2e59 100644
--- a/ui/views/controls/textfield/textfield_controller.cc
+++ b/ui/views/controls/textfield/textfield_controller.cc
@@ -9,6 +9,11 @@
namespace views {
+bool TextfieldController::HandleKeyEvent(Textfield* sender,
+ const ui::KeyEvent& key_event) {
+ return false;
+}
+
bool TextfieldController::HandleMouseEvent(Textfield* sender,
const ui::MouseEvent& mouse_event) {
return false;
diff --git a/ui/views/controls/textfield/textfield_controller.h b/ui/views/controls/textfield/textfield_controller.h
index 9a6c3302de..4e101e5f2b 100644
--- a/ui/views/controls/textfield/textfield_controller.h
+++ b/ui/views/controls/textfield/textfield_controller.h
@@ -29,13 +29,13 @@ class VIEWS_EXPORT TextfieldController {
// user. It won't be called if the text is changed by calling
// Textfield::SetText() or Textfield::AppendText().
virtual void ContentsChanged(Textfield* sender,
- const string16& new_contents) = 0;
+ const string16& new_contents) {}
// This method is called to get notified about keystrokes in the edit.
// Returns true if the message was handled and should not be processed
// further. If it returns false the processing continues.
virtual bool HandleKeyEvent(Textfield* sender,
- const ui::KeyEvent& key_event) = 0;
+ const ui::KeyEvent& key_event);
// This method is called to get notified about mouse events in the edit.
// Returns true if the message was handled and should not be processed
@@ -54,6 +54,9 @@ class VIEWS_EXPORT TextfieldController {
// Called after performing a Cut or Copy operation.
virtual void OnAfterCutOrCopy() {}
+ // Called after performing a Paste operation.
+ virtual void OnAfterPaste() {}
+
// Called after the textfield has written drag data to give the controller a
// chance to modify the drag data.
virtual void OnWriteDragData(ui::OSExchangeData* data) {}
diff --git a/ui/views/controls/textfield/textfield_views_model.cc b/ui/views/controls/textfield/textfield_views_model.cc
index 2b8bf2a4df..5ff20a5422 100644
--- a/ui/views/controls/textfield/textfield_views_model.cc
+++ b/ui/views/controls/textfield/textfield_views_model.cc
@@ -9,7 +9,7 @@
#include "base/i18n/break_iterator.h"
#include "base/logging.h"
#include "base/stl_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/base/range/range.h"
diff --git a/ui/views/controls/textfield/textfield_views_model_unittest.cc b/ui/views/controls/textfield/textfield_views_model_unittest.cc
index ee398855b1..14a4ef78b3 100644
--- a/ui/views/controls/textfield/textfield_views_model_unittest.cc
+++ b/ui/views/controls/textfield/textfield_views_model_unittest.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/string16.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
diff --git a/ui/views/controls/tree/tree_view_selector.cc b/ui/views/controls/tree/tree_view_selector.cc
index 0ca0fb2e67..f3bd055091 100644
--- a/ui/views/controls/tree/tree_view_selector.cc
+++ b/ui/views/controls/tree/tree_view_selector.cc
@@ -8,6 +8,7 @@
#include "ui/base/ime/text_input_type.h"
#include "ui/base/range/range.h"
#include "ui/views/controls/tree/tree_view.h"
+#include "ui/views/widget/widget.h"
namespace views {
@@ -54,6 +55,10 @@ void TreeViewSelector::InsertChar(char16 ch, int flags) {
OnTextInput(string16(1, ch));
}
+gfx::NativeWindow TreeViewSelector::GetAttachedWindow() const {
+ return tree_->GetWidget()->GetNativeWindow();
+}
+
ui::TextInputType TreeViewSelector::GetTextInputType() const {
return ui::TEXT_INPUT_TYPE_TEXT;
}
diff --git a/ui/views/controls/tree/tree_view_selector.h b/ui/views/controls/tree/tree_view_selector.h
index 11304bb298..c806169d6b 100644
--- a/ui/views/controls/tree/tree_view_selector.h
+++ b/ui/views/controls/tree/tree_view_selector.h
@@ -31,6 +31,7 @@ class VIEWS_EXPORT TreeViewSelector : public ui::TextInputClient {
virtual void ClearCompositionText() OVERRIDE;
virtual void InsertText(const string16& text) OVERRIDE;
virtual void InsertChar(char16 ch, int flags) OVERRIDE;
+ virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
virtual ui::TextInputType GetTextInputType() const OVERRIDE;
virtual bool CanComposeInline() const OVERRIDE;
virtual gfx::Rect GetCaretBounds() OVERRIDE;
diff --git a/ui/views/controls/tree/tree_view_unittest.cc b/ui/views/controls/tree/tree_view_unittest.cc
index 4c0dd05c46..ffcd9e0751 100644
--- a/ui/views/controls/tree/tree_view_unittest.cc
+++ b/ui/views/controls/tree/tree_view_unittest.cc
@@ -7,7 +7,7 @@
#include <string>
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/models/tree_node_model.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/tree/tree_view_selector.h"
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index 84ae2ea3ed..9ea236a475 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -6,7 +6,7 @@
#include <vector>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_details.h"
diff --git a/ui/views/controls/webview/webview.gyp b/ui/views/controls/webview/webview.gyp
index fbe094fa72..25cb11a723 100644
--- a/ui/views/controls/webview/webview.gyp
+++ b/ui/views/controls/webview/webview.gyp
@@ -14,9 +14,9 @@
'../../../../base/base.gyp:base',
'../../../../base/base.gyp:base_i18n',
'../../../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../../../../build/temp_gyp/googleurl.gyp:googleurl',
'../../../../content/content.gyp:content',
'../../../../skia/skia.gyp:skia',
+ '../../../../url/url.gyp:url_lib',
'../../../ui.gyp:ui',
'../../../web_dialogs/web_dialogs.gyp:web_dialogs',
'../../views.gyp:views',
diff --git a/ui/views/corewm/compound_event_filter_unittest.cc b/ui/views/corewm/compound_event_filter_unittest.cc
index eae159d75d..56159f0e03 100644
--- a/ui/views/corewm/compound_event_filter_unittest.cc
+++ b/ui/views/corewm/compound_event_filter_unittest.cc
@@ -11,6 +11,7 @@
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_activation_client.h"
+#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/test/test_windows.h"
#include "ui/base/events/event.h"
#include "ui/base/events/event_utils.h"
@@ -21,66 +22,6 @@ base::TimeDelta GetTime() {
return ui::EventTimeForNow();
}
-class TestCursorClient : public aura::client::CursorClient {
- public:
- TestCursorClient() : visible_(true), mouse_events_enabled_(true) {}
- virtual ~TestCursorClient() {}
-
- virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE {
- }
-
- virtual void ShowCursor() OVERRIDE {
- visible_ = true;
- }
-
- virtual void HideCursor() OVERRIDE {
- visible_ = false;
- }
-
- virtual bool IsCursorVisible() const OVERRIDE {
- return visible_;
- }
-
- virtual void EnableMouseEvents() OVERRIDE {
- mouse_events_enabled_ = true;
- }
-
- virtual void DisableMouseEvents() OVERRIDE {
- mouse_events_enabled_ = false;
- }
-
- virtual bool IsMouseEventsEnabled() const OVERRIDE {
- return mouse_events_enabled_;
- }
-
- virtual void SetScale(float scale) OVERRIDE {
- }
-
- virtual void SetDisplay(const gfx::Display& display) OVERRIDE {
- }
-
- virtual void LockCursor() OVERRIDE {
- }
-
- virtual void UnlockCursor() OVERRIDE {
- }
-
- virtual void SetCursorResourceModule(const string16& module_name) OVERRIDE {
- }
-
- virtual void AddObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE {
- }
-
- virtual void RemoveObserver(
- aura::client::CursorClientObserver* observer) OVERRIDE {
- }
-
- private:
- bool visible_;
- bool mouse_events_enabled_;
-};
-
}
namespace views {
@@ -116,7 +57,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
window->Show();
window->SetCapture();
- TestCursorClient cursor_client;
+ aura::test::TestCursorClient cursor_client;
aura::client::SetCursorClient(root_window(), &cursor_client);
ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
@@ -194,7 +135,7 @@ TEST_F(CompoundEventFilterTest, DontHideWhenMouseDown) {
gfx::Rect(5, 5, 100, 100), root_window()));
window->Show();
- TestCursorClient cursor_client;
+ aura::test::TestCursorClient cursor_client;
aura::client::SetCursorClient(root_window(), &cursor_client);
// Move and press the mouse over the window.
diff --git a/ui/views/corewm/tooltip_controller_unittest.cc b/ui/views/corewm/tooltip_controller_unittest.cc
index a4410c0a58..5cb3fe6b9d 100644
--- a/ui/views/corewm/tooltip_controller_unittest.cc
+++ b/ui/views/corewm/tooltip_controller_unittest.cc
@@ -4,7 +4,7 @@
#include "ui/views/corewm/tooltip_controller.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/tooltip_client.h"
#include "ui/aura/env.h"
diff --git a/ui/views/corewm/window_util.cc b/ui/views/corewm/window_util.cc
index 230fe54bcc..eaee174d73 100644
--- a/ui/views/corewm/window_util.cc
+++ b/ui/views/corewm/window_util.cc
@@ -8,6 +8,34 @@
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
+#include "ui/views/view.h"
+#include "ui/views/widget/widget.h"
+
+namespace {
+
+// Helper method for RecreateWindowLayers() which adds all the existing layers
+// for |view| and its descendants to |parent_layer|. New layers are created for
+// |view| (if it previously had a layer) and any descendants which previously
+// had layers. The new layers are blank, so nothing has been painted to them
+// yet. Returns true if this method added at least one layer to |parent_layer|.
+bool RecreateViewLayers(ui::Layer* parent_layer, views::View* view) {
+ bool recreated_layer = false;
+ if (view->layer()) {
+ ui::Layer* layer = view->RecreateLayer();
+ if (layer) {
+ layer->SuppressPaint();
+ parent_layer->Add(layer);
+ parent_layer = layer;
+ recreated_layer = true;
+ }
+ }
+ for (int i = 0; i < view->child_count(); ++i)
+ recreated_layer |= RecreateViewLayers(parent_layer, view->child_at(i));
+
+ return recreated_layer;
+}
+
+} // namespace
namespace views {
namespace corewm {
@@ -71,12 +99,39 @@ ui::Layer* RecreateWindowLayers(aura::Window* window, bool set_bounds) {
const gfx::Rect bounds = window->bounds();
ui::Layer* old_layer = window->RecreateLayer();
DCHECK(old_layer);
+
+ // Cache the order of |window|'s child layers. If |window| belongs to a widget
+ // and the widget has both child windows and child views with layers,
+ // |initial_layer_order| is used to determine the relative order.
+ std::vector<ui::Layer*> initial_layer_order = window->layer()->children();
+
+ // Recreate the layers for any child windows of |window|.
for (aura::Window::Windows::const_iterator it = window->children().begin();
it != window->children().end();
++it) {
- // Maintain the hierarchy of the detached layers.
old_layer->Add(RecreateWindowLayers(*it, set_bounds));
}
+
+ // Recreate the layers for any child views of |widget|.
+ bool has_view_layers = false;
+ views::Widget* widget = views::Widget::GetWidgetForNativeView(window);
+ if (widget && widget->GetRootView())
+ has_view_layers = RecreateViewLayers(old_layer, widget->GetRootView());
+
+ if (has_view_layers && !window->children().empty()) {
+ // RecreateViewLayers() added the view layers above the window layers in
+ // z-order. The window layers and the view layers may have been originally
+ // intermingled. Reorder |old_layer|'s children based on the initial
+ // order.
+ for (size_t i = 0; i < initial_layer_order.size(); ++i) {
+ ui::Layer* layer = initial_layer_order[i];
+ std::vector<ui::Layer*>::const_iterator it = std::find(
+ old_layer->children().begin(), old_layer->children().end(), layer);
+ if (it != old_layer->children().end())
+ old_layer->StackAtTop(layer);
+ }
+ }
+
if (set_bounds)
window->SetBounds(bounds);
return old_layer;
diff --git a/ui/views/corewm/window_util_unittest.cc b/ui/views/corewm/window_util_unittest.cc
new file mode 100644
index 0000000000..fdf3a46fa2
--- /dev/null
+++ b/ui/views/corewm/window_util_unittest.cc
@@ -0,0 +1,117 @@
+// Copyright 2013 The Chromium Authors. 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_util.h"
+
+#include "ui/aura/root_window.h"
+#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/window.h"
+#include "ui/compositor/test/test_layers.h"
+#include "ui/views/view_constants_aura.h"
+#include "ui/views/widget/widget.h"
+
+class WindowUtilTest : public aura::test::AuraTestBase {
+ public:
+ WindowUtilTest() {
+ }
+
+ virtual ~WindowUtilTest() {
+ }
+
+ // Creates a widget of TYPE_CONTROL.
+ // The caller takes ownership of the returned widget.
+ views::Widget* CreateControlWidget(
+ aura::Window* parent,
+ const gfx::Rect& bounds) const WARN_UNUSED_RESULT {
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
+ params.parent = parent;
+ params.bounds = bounds;
+ views::Widget* widget = new views::Widget();
+ widget->Init(params);
+ return widget;
+ }
+
+ // Returns a view with a layer with the passed in |bounds| and |layer_name|.
+ // The caller takes ownership of the returned view.
+ views::View* CreateViewWithLayer(
+ const gfx::Rect& bounds,
+ const char* layer_name) const WARN_UNUSED_RESULT {
+ views::View* view = new views::View();
+ view->SetBoundsRect(bounds);
+ view->SetPaintToLayer(true);
+ view->layer()->set_name(layer_name);
+ return view;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowUtilTest);
+};
+
+// Test that RecreateWindowLayers() recreates the layers for all child windows
+// and all child views and that the z-order of the recreated layers matches that
+// of the original layers.
+// Test hierarchy:
+// w1
+// +-- v1
+// +-- v2 (no layer)
+// +-- v3 (no layer)
+// +-- v4
+// +-- w2
+// +-- v5
+// +-- v6
+// +-- v7
+TEST_F(WindowUtilTest, RecreateWindowLayers) {
+ views::Widget* w1 = CreateControlWidget(root_window(),
+ gfx::Rect(0, 0, 100, 100));
+ w1->GetNativeView()->layer()->set_name("w1");
+
+ views::View* v2 = new views::View();
+ v2->SetBounds(0, 1, 100, 101);
+ views::View* v3 = new views::View();
+ v3->SetBounds(0, 2, 100, 102);
+ views::View* w2_host_view = new views::View();
+
+ w1->GetRootView()->AddChildView(CreateViewWithLayer(
+ gfx::Rect(0, 3, 100, 103), "v1"));
+ w1->GetRootView()->AddChildView(v2);
+ v2->AddChildView(v3);
+ v2->AddChildView(CreateViewWithLayer(gfx::Rect(0, 4, 100, 104), "v4"));
+
+ w1->GetRootView()->AddChildView(w2_host_view);
+ w1->GetRootView()->AddChildView(CreateViewWithLayer(
+ gfx::Rect(0, 4, 100, 104), "v7"));
+
+ views::Widget* w2 = CreateControlWidget(w1->GetNativeView(),
+ gfx::Rect(0, 5, 100, 105));
+ w2->GetNativeView()->layer()->set_name("w2");
+ w2->GetNativeView()->SetProperty(views::kHostViewKey, w2_host_view);
+
+ views::View* v5 = CreateViewWithLayer(gfx::Rect(0, 6, 100, 106), "v5");
+ w2->GetRootView()->AddChildView(v5);
+ v5->AddChildView(CreateViewWithLayer(gfx::Rect(0, 7, 100, 107), "v6"));
+
+ // Test the initial order of the layers.
+ ui::Layer* w1_layer = w1->GetNativeView()->layer();
+ ASSERT_EQ("w1", w1_layer->name());
+ ASSERT_EQ("v1 v4 w2 v7", ui::test::ChildLayerNamesAsString(*w1_layer));
+ ui::Layer* w2_layer = w1_layer->children()[2];
+ ASSERT_EQ("v5", ui::test::ChildLayerNamesAsString(*w2_layer));
+ ui::Layer* v5_layer = w2_layer->children()[0];
+ ASSERT_EQ("v6", ui::test::ChildLayerNamesAsString(*v5_layer));
+
+ w1_layer = views::corewm::RecreateWindowLayers(w1->GetNativeView(), false);
+
+ // The order of the layers returned by RecreateWindowLayers() should match the
+ // order of the layers prior to calling RecreateWindowLayers().
+ ASSERT_EQ("w1", w1_layer->name());
+ ASSERT_EQ("v1 v4 w2 v7", ui::test::ChildLayerNamesAsString(*w1_layer));
+ w2_layer = w1_layer->children()[2];
+ ASSERT_EQ("v5", ui::test::ChildLayerNamesAsString(*w2_layer));
+ v5_layer = w2_layer->children()[0];
+ ASSERT_EQ("v6", ui::test::ChildLayerNamesAsString(*v5_layer));
+
+ views::corewm::DeepDeleteLayers(w1_layer);
+ // The views and the widgets are destroyed when AuraTestHelper::TearDown()
+ // destroys root_window().
+}
diff --git a/ui/views/debug_utils.cc b/ui/views/debug_utils.cc
index 1c95e19178..536a6f6abf 100644
--- a/ui/views/debug_utils.cc
+++ b/ui/views/debug_utils.cc
@@ -7,7 +7,7 @@
#include <iostream>
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/view.h"
namespace views {
diff --git a/ui/views/examples/bubble_example.cc b/ui/views/examples/bubble_example.cc
index ecc795c194..b9498f4ac9 100644
--- a/ui/views/examples/bubble_example.cc
+++ b/ui/views/examples/bubble_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/bubble_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/label.h"
diff --git a/ui/views/examples/button_example.cc b/ui/views/examples/button_example.cc
index 55f97fa5c3..6f043f1504 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/button_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
diff --git a/ui/views/examples/checkbox_example.cc b/ui/views/examples/checkbox_example.cc
index 8f2dea6a4c..a7f2845f7c 100644
--- a/ui/views/examples/checkbox_example.cc
+++ b/ui/views/examples/checkbox_example.cc
@@ -5,7 +5,7 @@
#include "ui/views/examples/checkbox_example.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/layout/fill_layout.h"
diff --git a/ui/views/examples/combobox_example.cc b/ui/views/examples/combobox_example.cc
index 2810450dc0..3dea420440 100644
--- a/ui/views/examples/combobox_example.cc
+++ b/ui/views/examples/combobox_example.cc
@@ -5,7 +5,7 @@
#include "ui/views/examples/combobox_example.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/layout/fill_layout.h"
diff --git a/ui/views/examples/example_combobox_model.cc b/ui/views/examples/example_combobox_model.cc
index c1a6b39368..255ef15af9 100644
--- a/ui/views/examples/example_combobox_model.cc
+++ b/ui/views/examples/example_combobox_model.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/example_combobox_model.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
namespace views {
namespace examples {
diff --git a/ui/views/examples/examples_window.cc b/ui/views/examples/examples_window.cc
index f21da5fa16..d904f057f9 100644
--- a/ui/views/examples/examples_window.cc
+++ b/ui/views/examples/examples_window.cc
@@ -7,7 +7,7 @@
#include <string>
#include "base/memory/scoped_vector.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/ui_base_paths.h"
#include "ui/views/controls/combobox/combobox.h"
diff --git a/ui/views/examples/examples_window_with_content.cc b/ui/views/examples/examples_window_with_content.cc
index 8501303c21..92e8b06430 100644
--- a/ui/views/examples/examples_window_with_content.cc
+++ b/ui/views/examples/examples_window_with_content.cc
@@ -7,7 +7,7 @@
#include <string>
#include "base/memory/scoped_vector.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_context.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/ui_base_paths.h"
diff --git a/ui/views/examples/label_example.cc b/ui/views/examples/label_example.cc
index 471c54fd26..d970bf1a2d 100644
--- a/ui/views/examples/label_example.cc
+++ b/ui/views/examples/label_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/label_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
diff --git a/ui/views/examples/link_example.cc b/ui/views/examples/link_example.cc
index 4882aaa6f3..a28c5d579e 100644
--- a/ui/views/examples/link_example.cc
+++ b/ui/views/examples/link_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/link_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/link.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
diff --git a/ui/views/examples/menu_example.cc b/ui/views/examples/menu_example.cc
index 472e1f59d2..5da8d3c0b2 100644
--- a/ui/views/examples/menu_example.cc
+++ b/ui/views/examples/menu_example.cc
@@ -6,7 +6,7 @@
#include <set>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/menu_button_listener.h"
diff --git a/ui/views/examples/message_box_example.cc b/ui/views/examples/message_box_example.cc
index 9f16d44118..2563525f32 100644
--- a/ui/views/examples/message_box_example.cc
+++ b/ui/views/examples/message_box_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/message_box_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/message_box_view.h"
#include "ui/views/layout/grid_layout.h"
diff --git a/ui/views/examples/progress_bar_example.cc b/ui/views/examples/progress_bar_example.cc
index b2f03bf54e..ce29ecd0fa 100644
--- a/ui/views/examples/progress_bar_example.cc
+++ b/ui/views/examples/progress_bar_example.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/progress_bar.h"
#include "ui/views/layout/grid_layout.h"
@@ -16,7 +16,7 @@ namespace {
const double kStepSize = 0.1;
-double ClampToMin(double percent) {
+double SetToMax(double percent) {
return std::min(std::max(percent, 0.0), 1.0);
}
@@ -61,9 +61,9 @@ void ProgressBarExample::CreateExampleView(View* container) {
void ProgressBarExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == minus_button_)
- current_percent_ = ClampToMin(current_percent_ - kStepSize);
+ current_percent_ = SetToMax(current_percent_ - kStepSize);
else if (sender == plus_button_)
- current_percent_ = ClampToMin(current_percent_ + kStepSize);
+ current_percent_ = SetToMax(current_percent_ + kStepSize);
progress_bar_->SetValue(current_percent_);
}
diff --git a/ui/views/examples/radio_button_example.cc b/ui/views/examples/radio_button_example.cc
index 7b27bd34ec..6426e72775 100644
--- a/ui/views/examples/radio_button_example.cc
+++ b/ui/views/examples/radio_button_example.cc
@@ -5,7 +5,7 @@
#include "ui/views/examples/radio_button_example.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/layout/grid_layout.h"
diff --git a/ui/views/examples/scroll_view_example.cc b/ui/views/examples/scroll_view_example.cc
index dd92a71b08..8094a46ef6 100644
--- a/ui/views/examples/scroll_view_example.cc
+++ b/ui/views/examples/scroll_view_example.cc
@@ -5,7 +5,7 @@
#include "ui/views/examples/scroll_view_example.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/layout/grid_layout.h"
diff --git a/ui/views/examples/slider_example.cc b/ui/views/examples/slider_example.cc
index 1c45a4bb61..566adc0661 100644
--- a/ui/views/examples/slider_example.cc
+++ b/ui/views/examples/slider_example.cc
@@ -5,7 +5,7 @@
#include "ui/views/examples/slider_example.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/view.h"
diff --git a/ui/views/examples/tabbed_pane_example.cc b/ui/views/examples/tabbed_pane_example.cc
index 7e008ae7a4..f0f6691ef8 100644
--- a/ui/views/examples/tabbed_pane_example.cc
+++ b/ui/views/examples/tabbed_pane_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/tabbed_pane_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/tabbed_pane/tabbed_pane.h"
#include "ui/views/layout/grid_layout.h"
diff --git a/ui/views/examples/table_example.cc b/ui/views/examples/table_example.cc
index 32926cc246..26bf1bea39 100644
--- a/ui/views/examples/table_example.cc
+++ b/ui/views/examples/table_example.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/image/image_skia.h"
diff --git a/ui/views/examples/text_example.cc b/ui/views/examples/text_example.cc
index 6ceed4abc2..9e58e792b7 100644
--- a/ui/views/examples/text_example.cc
+++ b/ui/views/examples/text_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/text_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/views/controls/button/checkbox.h"
diff --git a/ui/views/examples/textfield_example.cc b/ui/views/examples/textfield_example.cc
index 6d9c505d2a..55f1c44c7e 100644
--- a/ui/views/examples/textfield_example.cc
+++ b/ui/views/examples/textfield_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/textfield_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/events/event.h"
#include "ui/base/range/range.h"
#include "ui/gfx/render_text.h"
diff --git a/ui/views/examples/tree_view_example.cc b/ui/views/examples/tree_view_example.cc
index e2f3396caf..9d1af4e6e8 100644
--- a/ui/views/examples/tree_view_example.cc
+++ b/ui/views/examples/tree_view_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/tree_view_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
#include "ui/views/controls/menu/menu_runner.h"
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 523151417e..e50700030a 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -4,7 +4,7 @@
#include "ui/views/examples/widget_example.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
diff --git a/ui/views/focus/focus_manager_factory.cc b/ui/views/focus/focus_manager_factory.cc
index be17f75218..62770d71b1 100644
--- a/ui/views/focus/focus_manager_factory.cc
+++ b/ui/views/focus/focus_manager_factory.cc
@@ -17,7 +17,8 @@ class DefaultFocusManagerFactory : public FocusManagerFactory {
virtual ~DefaultFocusManagerFactory() {}
protected:
- virtual FocusManager* CreateFocusManager(Widget* widget) OVERRIDE {
+ virtual FocusManager* CreateFocusManager(Widget* widget,
+ bool desktop_widget) OVERRIDE {
return new FocusManager(widget, NULL /* delegate */);
}
@@ -36,10 +37,11 @@ FocusManagerFactory::~FocusManagerFactory() {
}
// static
-FocusManager* FocusManagerFactory::Create(Widget* widget) {
+FocusManager* FocusManagerFactory::Create(Widget* widget,
+ bool desktop_widget) {
if (!focus_manager_factory)
focus_manager_factory = new DefaultFocusManagerFactory();
- return focus_manager_factory->CreateFocusManager(widget);
+ return focus_manager_factory->CreateFocusManager(widget, desktop_widget);
}
// static
diff --git a/ui/views/focus/focus_manager_factory.h b/ui/views/focus/focus_manager_factory.h
index b808fec67c..6f13b24778 100644
--- a/ui/views/focus/focus_manager_factory.h
+++ b/ui/views/focus/focus_manager_factory.h
@@ -18,7 +18,7 @@ class Widget;
class VIEWS_EXPORT FocusManagerFactory {
public:
// Create a FocusManager for the given |widget| using installe Factory.
- static FocusManager* Create(Widget* widget);
+ static FocusManager* Create(Widget* widget, bool desktop_widget);
// Installs FocusManagerFactory. If |factory| is NULL, it resets
// to the default factory which creates plain FocusManager.
@@ -29,7 +29,10 @@ class VIEWS_EXPORT FocusManagerFactory {
virtual ~FocusManagerFactory();
// Create a FocusManager for the given |widget|.
- virtual FocusManager* CreateFocusManager(Widget* widget) = 0;
+ // The |desktop_widget| bool is true for widgets created in the desktop and
+ // false for widgets created in the shell.
+ virtual FocusManager* CreateFocusManager(Widget* widget,
+ bool desktop_widget) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FocusManagerFactory);
diff --git a/ui/views/focus/focus_manager_unittest.cc b/ui/views/focus/focus_manager_unittest.cc
index 63835ac53b..936ded3088 100644
--- a/ui/views/focus/focus_manager_unittest.cc
+++ b/ui/views/focus/focus_manager_unittest.cc
@@ -5,7 +5,7 @@
#include <utility>
#include <vector>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/views/accessible_pane_view.h"
@@ -525,7 +525,8 @@ class FocusManagerDtorTest : public FocusManagerTest {
: dtor_tracker_(dtor_tracker) {
}
- virtual FocusManager* CreateFocusManager(Widget* widget) OVERRIDE {
+ virtual FocusManager* CreateFocusManager(Widget* widget,
+ bool desktop_widget) OVERRIDE {
return new FocusManagerDtorTracked(widget, dtor_tracker_);
}
diff --git a/ui/views/focus/focus_manager_unittest_win.cc b/ui/views/focus/focus_manager_unittest_win.cc
index 6dfdecda12..2e7ddc0e3b 100644
--- a/ui/views/focus/focus_manager_unittest_win.cc
+++ b/ui/views/focus/focus_manager_unittest_win.cc
@@ -6,7 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/events/event.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/focus/accelerator_handler.h"
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc
index e0018813ce..9a75c528d8 100644
--- a/ui/views/focus/focus_traversal_unittest.cc
+++ b/ui/views/focus/focus_traversal_unittest.cc
@@ -6,7 +6,7 @@
#include "base/run_loop.h"
#include "base/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/models/combobox_model.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/label_button.h"
diff --git a/ui/views/ime/input_method_bridge.cc b/ui/views/ime/input_method_bridge.cc
index f300039cde..5c8bd90dac 100644
--- a/ui/views/ime/input_method_bridge.cc
+++ b/ui/views/ime/input_method_bridge.cc
@@ -117,6 +117,12 @@ void InputMethodBridge::InsertChar(char16 ch, int flags) {
client->InsertChar(ch, flags);
}
+gfx::NativeWindow InputMethodBridge::GetAttachedWindow() const {
+ TextInputClient* client = GetTextInputClient();
+ return client ?
+ client->GetAttachedWindow() : static_cast<gfx::NativeWindow>(NULL);
+}
+
ui::TextInputType InputMethodBridge::GetTextInputType() const {
TextInputClient* client = GetTextInputClient();
return client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
diff --git a/ui/views/ime/input_method_bridge.h b/ui/views/ime/input_method_bridge.h
index 810ba908cc..c087638033 100644
--- a/ui/views/ime/input_method_bridge.h
+++ b/ui/views/ime/input_method_bridge.h
@@ -53,6 +53,7 @@ class InputMethodBridge : public InputMethodBase,
virtual void ClearCompositionText() OVERRIDE;
virtual void InsertText(const string16& text) OVERRIDE;
virtual void InsertChar(char16 ch, int flags) OVERRIDE;
+ virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE;
virtual ui::TextInputType GetTextInputType() const OVERRIDE;
virtual bool CanComposeInline() const OVERRIDE;
virtual gfx::Rect GetCaretBounds() OVERRIDE;
diff --git a/ui/views/run_all_unittests.cc b/ui/views/run_all_unittests.cc
index d2962b498b..cd730112dd 100644
--- a/ui/views/run_all_unittests.cc
+++ b/ui/views/run_all_unittests.cc
@@ -8,7 +8,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor_setup.h"
-#include "ui/compositor/test/compositor_test_support.h"
#include "ui/views/view.h"
class ViewTestSuite : public base::TestSuite {
@@ -21,14 +20,9 @@ class ViewTestSuite : public base::TestSuite {
ui::RegisterPathProvider();
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
- ui::CompositorTestSupport::Initialize();
ui::SetupTestCompositor();
}
- virtual void Shutdown() OVERRIDE {
- ui::CompositorTestSupport::Terminate();
- }
-
private:
DISALLOW_COPY_AND_ASSIGN(ViewTestSuite);
};
diff --git a/ui/views/test/child_modal_window.cc b/ui/views/test/child_modal_window.cc
index f84bbc1cc3..510275c509 100644
--- a/ui/views/test/child_modal_window.cc
+++ b/ui/views/test/child_modal_window.cc
@@ -4,7 +4,7 @@
#include "ui/views/test/child_modal_window.h"
-#include "base/utf_string_conversions.h" // ASCIIToUTF16
+#include "base/strings/utf_string_conversions.h" // ASCIIToUTF16
#include "ui/aura/window.h"
#include "ui/gfx/canvas.h"
#include "ui/views/background.h"
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
index 9aa46799e2..58105d658d 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -62,4 +62,8 @@ void TestViewsDelegate::OnBeforeWidgetInit(
internal::NativeWidgetDelegate* delegate) {
}
+base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
+ return base::TimeDelta();
+}
+
} // namespace views
diff --git a/ui/views/test/test_views_delegate.h b/ui/views/test/test_views_delegate.h
index 21119eae9b..4c2e31b252 100644
--- a/ui/views/test/test_views_delegate.h
+++ b/ui/views/test/test_views_delegate.h
@@ -61,6 +61,7 @@ class TestViewsDelegate : public ViewsDelegate {
virtual void OnBeforeWidgetInit(
Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) OVERRIDE;
+ virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() OVERRIDE;
private:
bool use_transparent_windows_;
diff --git a/ui/views/touchui/touch_editing_menu.cc b/ui/views/touchui/touch_editing_menu.cc
index 156c5fad4f..65ee1c332b 100644
--- a/ui/views/touchui/touch_editing_menu.cc
+++ b/ui/views/touchui/touch_editing_menu.cc
@@ -4,7 +4,7 @@
#include "ui/views/touchui/touch_editing_menu.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index a527b1ab00..643a05a7d1 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -5,9 +5,12 @@
#include "ui/views/touchui/touch_selection_controller_impl.h"
#include "base/time.h"
+#include "grit/ui_resources.h"
#include "grit/ui_strings.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/path.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
@@ -18,23 +21,19 @@
namespace {
// Constants defining the visual attributes of selection handles
-const int kSelectionHandleRadius = 10;
-const int kSelectionHandleAlpha = 0x7F;
-const SkColor kSelectionHandleColor =
- SkColorSetA(SK_ColorBLACK, kSelectionHandleAlpha);
+const int kSelectionHandleLineWidth = 1;
+const SkColor kSelectionHandleLineColor =
+ SkColorSetRGB(0x42, 0x81, 0xf4);
+
+// Padding around the selection handle defining the area that will be included
+// in the touch target to make dragging the handle easier.
+const int kSelectionHandlePadding = 10;
// The minimum selection size to trigger selection controller.
const int kMinSelectionSize = 4;
const int kContextMenuTimoutMs = 200;
-// Convenience struct to represent a circle shape.
-struct Circle {
- int radius;
- gfx::Point center;
- SkColor color;
-};
-
// Creates a widget to host SelectionHandleView.
views::Widget* CreateTouchSelectionPopupWidget(
gfx::NativeView context,
@@ -53,12 +52,17 @@ views::Widget* CreateTouchSelectionPopupWidget(
return widget;
}
-void PaintCircle(const Circle& circle, gfx::Canvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(circle.color);
- canvas->DrawCircle(circle.center, circle.radius, paint);
+gfx::Image* GetHandleImage() {
+ static gfx::Image* handle_image = NULL;
+ if (!handle_image) {
+ handle_image = &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_TEXT_SELECTION_HANDLE);
+ }
+ return handle_image;
+}
+
+gfx::Size GetHandleImageSize() {
+ return GetHandleImage()->Size();
}
// The points may not match exactly, since the selection range computation may
@@ -70,12 +74,6 @@ bool IsEmptySelection(const gfx::Point& p1, const gfx::Point& p2) {
return (abs(delta_x) < kMinSelectionSize && abs(delta_y) < kMinSelectionSize);
}
-gfx::Rect GetHandleBoundsFromCursor(const gfx::Rect& cursor) {
- return gfx::Rect(cursor.x() - kSelectionHandleRadius, cursor.y(),
- 2 * kSelectionHandleRadius,
- 2 * kSelectionHandleRadius + cursor.height());
-}
-
} // namespace
namespace views {
@@ -107,9 +105,11 @@ class TouchSelectionControllerImpl::EditingHandleView
}
virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE {
- mask->addCircle(SkIntToScalar(kSelectionHandleRadius),
- SkIntToScalar(kSelectionHandleRadius + cursor_height_),
- SkIntToScalar(kSelectionHandleRadius));
+ gfx::Size image_size = GetHandleImageSize();
+ mask->addRect(SkIntToScalar(0), SkIntToScalar(cursor_height_),
+ SkIntToScalar(image_size.width()) + 2 * kSelectionHandlePadding,
+ SkIntToScalar(cursor_height_ + image_size.height() +
+ kSelectionHandlePadding));
}
virtual void DeleteDelegate() OVERRIDE {
@@ -118,13 +118,19 @@ class TouchSelectionControllerImpl::EditingHandleView
// Overridden from views::View:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- Circle circle = {kSelectionHandleRadius, gfx::Point(kSelectionHandleRadius,
- kSelectionHandleRadius + cursor_height_),
- kSelectionHandleColor};
- PaintCircle(circle, canvas);
- canvas->DrawLine(gfx::Point(kSelectionHandleRadius, 0),
- gfx::Point(kSelectionHandleRadius, cursor_height_),
- kSelectionHandleColor);
+ gfx::Size image_size = GetHandleImageSize();
+ int cursor_pos_x = image_size.width() / 2 - kSelectionHandleLineWidth +
+ kSelectionHandlePadding;
+
+ // Draw the cursor line.
+ canvas->FillRect(
+ gfx::Rect(cursor_pos_x, 0,
+ 2 * kSelectionHandleLineWidth + 1, cursor_height_),
+ kSelectionHandleLineColor);
+
+ // Draw the handle image.
+ canvas->DrawImageInt(*GetHandleImage()->ToImageSkia(),
+ kSelectionHandlePadding, cursor_height_);
}
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
@@ -156,8 +162,9 @@ class TouchSelectionControllerImpl::EditingHandleView
}
virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(2 * kSelectionHandleRadius,
- 2 * kSelectionHandleRadius + cursor_height_);
+ gfx::Size image_size = GetHandleImageSize();
+ return gfx::Size(image_size.width() + 2 * kSelectionHandlePadding,
+ image_size.height() + cursor_height_ + kSelectionHandlePadding);
}
bool IsWidgetVisible() const {
@@ -165,8 +172,13 @@ class TouchSelectionControllerImpl::EditingHandleView
}
void SetSelectionRectInScreen(const gfx::Rect& rect) {
+ gfx::Size image_size = GetHandleImageSize();
cursor_height_ = rect.height();
- gfx::Rect widget_bounds = GetHandleBoundsFromCursor(rect);
+ gfx::Rect widget_bounds(
+ rect.x() - image_size.width() / 2 - kSelectionHandlePadding,
+ rect.y(),
+ image_size.width() + 2 * kSelectionHandlePadding,
+ rect.height() + image_size.height() + kSelectionHandlePadding);
widget_->SetBounds(widget_bounds);
}
@@ -288,9 +300,10 @@ void TouchSelectionControllerImpl::SelectionHandleDragged(
DCHECK(dragging_handle_);
+ gfx::Size image_size = GetHandleImageSize();
gfx::Point offset_drag_pos(drag_pos.x(),
drag_pos.y() - dragging_handle_->cursor_height() / 2 -
- 2 * kSelectionHandleRadius);
+ image_size.height() / 2);
ConvertPointToClientView(dragging_handle_, &offset_drag_pos);
if (dragging_handle_ == cursor_handle_.get()) {
client_view_->MoveCaretTo(offset_drag_pos);
@@ -303,7 +316,8 @@ void TouchSelectionControllerImpl::SelectionHandleDragged(
fixed_handle = selection_handle_2_.get();
// Find selection end points in client_view's coordinate system.
- gfx::Point p2(kSelectionHandleRadius, fixed_handle->cursor_height() / 2);
+ gfx::Point p2(image_size.width() / 2 + kSelectionHandlePadding,
+ fixed_handle->cursor_height() / 2);
ConvertPointToClientView(fixed_handle, &p2);
// Instruct client_view to select the region between p1 and p2. The position
@@ -329,8 +343,9 @@ void TouchSelectionControllerImpl::ExecuteCommand(int command_id,
}
void TouchSelectionControllerImpl::OpenContextMenu() {
- gfx::Point anchor = context_menu_->anchor_rect().origin();
- anchor.Offset(0, -kSelectionHandleRadius);
+ gfx::Size image_size = GetHandleImageSize();
+ gfx::Point anchor = context_menu_->anchor_rect().CenterPoint();
+ anchor.Offset(0, -image_size.height() / 2);
HideContextMenu();
client_view_->OpenContextMenu(anchor);
}
@@ -358,8 +373,15 @@ void TouchSelectionControllerImpl::ContextMenuTimerFired() {
gfx::Rect r1, r2;
client_view_->GetSelectionEndPoints(&r1, &r2);
- gfx::Rect handle_1_bounds = GetHandleBoundsFromCursor(r1);
- gfx::Rect handle_2_bounds = GetHandleBoundsFromCursor(r2);
+ gfx::Rect handle_1_bounds;
+ gfx::Rect handle_2_bounds;
+ if (cursor_handle_->IsWidgetVisible()) {
+ handle_1_bounds = cursor_handle_->GetBoundsInScreen();
+ handle_2_bounds = handle_1_bounds;
+ } else {
+ handle_1_bounds = selection_handle_1_->GetBoundsInScreen();
+ handle_2_bounds = selection_handle_2_->GetBoundsInScreen();
+ }
// if selection is completely inside the view, we display the context menu
// in the middle of the end points on the top. Else, we show it above the
@@ -377,10 +399,6 @@ void TouchSelectionControllerImpl::ContextMenuTimerFired() {
return;
}
- gfx::Point menu_origin = menu_anchor.origin();
- client_view_->ConvertPointToScreen(&menu_origin);
- menu_anchor.set_origin(menu_origin);
-
DCHECK(!context_menu_);
context_menu_ = new TouchEditingMenuView(this, menu_anchor,
client_view_->GetNativeView());
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index 25fc0f19f5..505acd806e 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include "base/command_line.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "grit/ui_resources.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/base/touch/touch_editing_controller.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/point.h"
@@ -20,6 +22,24 @@
#include "ui/aura/window.h"
#endif
+namespace {
+// Should match kSelectionHandlePadding in touch_selection_controller.
+const int kPadding = 10;
+
+gfx::Image* GetHandleImage() {
+ static gfx::Image* handle_image = NULL;
+ if (!handle_image) {
+ handle_image = &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_TEXT_SELECTION_HANDLE);
+ }
+ return handle_image;
+}
+
+gfx::Size GetHandleImageSize() {
+ return GetHandleImage()->Size();
+}
+} // namespace
+
namespace views {
class TouchSelectionControllerImplTest : public ViewsTestBase {
@@ -87,7 +107,7 @@ class TouchSelectionControllerImplTest : public ViewsTestBase {
// Offset the drag position by the selection handle radius since it is
// supposed to be in the coordinate system of the handle.
- p.Offset(10, 0);
+ p.Offset(GetHandleImageSize().width() / 2 + kPadding, 0);
controller->SelectionHandleDragged(p);
// Do the work of OnMouseReleased().
@@ -149,8 +169,8 @@ class TouchSelectionControllerImplTest : public ViewsTestBase {
gfx::Point selection_end = GetCursorPosition(sel); \
gfx::Point sh1 = GetSelectionHandle1Position(); \
gfx::Point sh2 = GetSelectionHandle2Position(); \
- sh1.Offset(10, 0); \
- sh2.Offset(10, 0); \
+ sh1.Offset(GetHandleImageSize().width() / 2 + kPadding, 0); \
+ sh2.Offset(GetHandleImageSize().width() / 2 + kPadding, 0); \
if (cursor_at_selection_handle_1) { \
EXPECT_EQ(sh1, selection_end); \
EXPECT_EQ(sh2, selection_start); \
@@ -164,7 +184,7 @@ class TouchSelectionControllerImplTest : public ViewsTestBase {
EXPECT_TRUE(IsCursorHandleVisible()); \
gfx::Point cursor_pos = GetCursorPosition(sel); \
gfx::Point ch_pos = GetCursorHandlePosition(); \
- ch_pos.Offset(10, 0); \
+ ch_pos.Offset(GetHandleImageSize().width() / 2 + kPadding, 0); \
EXPECT_EQ(ch_pos, cursor_pos); \
} \
}
@@ -429,6 +449,7 @@ TEST_F(TouchSelectionControllerImplTest,
// handle is not eating the event and that the event is falling through to the
// textfield.
gfx::Point cursor_pos = GetCursorHandlePosition();
+ cursor_pos.Offset(GetHandleImageSize().width() / 2 + kPadding, 0);
generator.GestureTapAt(cursor_pos);
generator.GestureTapAt(cursor_pos);
EXPECT_TRUE(textfield_->HasSelection());
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 43719f3681..61c1d156ac 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -14,7 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkRect.h"
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/dragdrop/drag_drop_types.h"
@@ -535,12 +535,6 @@ ui::Layer* View::RecreateLayer() {
return NULL;
CreateLayer();
-
- // TODO(pkotwicz): Remove this once ReorderLayers() stacks layers not attached
- // to a view above layers attached to a view.
- if (layer->parent())
- layer->parent()->StackAtTop(layer);
-
layer_->set_scale_content(layer->scale_content());
return layer;
}
@@ -1458,8 +1452,8 @@ void View::ReorderLayers() {
while (v && !v->layer())
v = v->parent();
+ Widget* widget = GetWidget();
if (!v) {
- Widget* widget = GetWidget();
if (widget) {
ui::Layer* layer = widget->GetLayer();
if (layer)
@@ -1468,15 +1462,29 @@ void View::ReorderLayers() {
} else {
v->ReorderChildLayers(v->layer());
}
+
+ if (widget) {
+ // Reorder the widget's child NativeViews in case a child NativeView is
+ // associated with a view (eg via a NativeViewHost). Always do the
+ // reordering because the associated NativeView's layer (if it has one)
+ // is parented to the widget's layer regardless of whether the host view has
+ // an ancestor with a layer.
+ widget->ReorderNativeViews();
+ }
}
void View::ReorderChildLayers(ui::Layer* parent_layer) {
if (layer() && layer() != parent_layer) {
DCHECK_EQ(parent_layer, layer()->parent());
- parent_layer->StackAtTop(layer());
+ parent_layer->StackAtBottom(layer());
} else {
- for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i)
- (*i)->ReorderChildLayers(parent_layer);
+ // Iterate backwards through the children so that a child with a layer
+ // which is further to the back is stacked above one which is further to
+ // the front.
+ for (Views::const_reverse_iterator it(children_.rbegin());
+ it != children_.rend(); ++it) {
+ (*it)->ReorderChildLayers(parent_layer);
+ }
}
}
diff --git a/ui/views/view.h b/ui/views/view.h
index db2452b946..4b10f0cd82 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -1104,7 +1104,11 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
virtual void ReorderLayers();
// This reorders the immediate children of |*parent_layer| to match the
- // order of the view tree.
+ // order of the view tree. Child layers which are owned by a view are
+ // reordered so that they are below any child layers not owned by a view.
+ // Widget::ReorderNativeViews() should be called to reorder any child layers
+ // with an associated view. Widget::ReorderNativeViews() may reorder layers
+ // below layers owned by a view.
virtual void ReorderChildLayers(ui::Layer* parent_layer);
// Input ---------------------------------------------------------------------
diff --git a/ui/views/view_constants_aura.cc b/ui/views/view_constants_aura.cc
new file mode 100644
index 0000000000..977050fb4e
--- /dev/null
+++ b/ui/views/view_constants_aura.cc
@@ -0,0 +1,16 @@
+// Copyright 2013 The Chromium Authors. 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/view_constants_aura.h"
+
+#include "ui/aura/window_property.h"
+#include "ui/views/view.h"
+
+DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, views::View*);
+
+namespace views {
+
+DEFINE_WINDOW_PROPERTY_KEY(views::View*, kHostViewKey, NULL);
+
+} // namespace views
diff --git a/ui/views/view_constants_aura.h b/ui/views/view_constants_aura.h
new file mode 100644
index 0000000000..e0d718d2e8
--- /dev/null
+++ b/ui/views/view_constants_aura.h
@@ -0,0 +1,22 @@
+// Copyright 2013 The Chromium Authors. 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_VIEWS_VIEW_CONSTANTS_AURA_H_
+#define UI_VIEWS_VIEW_CONSTANTS_AURA_H_
+
+#include "ui/aura/window.h"
+#include "ui/views/views_export.h"
+
+namespace views {
+class View;
+
+// A property key to indicate the view the window is associated with. If
+// specified, the z-order of the view, relative to other views, dictates the
+// z-order of the window and its associated layer. The associated view must
+// have the same parent widget as the window on which the property is set.
+VIEWS_EXPORT extern const aura::WindowProperty<View*>* const kHostViewKey;
+
+} // namespace views
+
+#endif // UI_VIEWS_VIEW_CONSTANTS_AURA_H_
diff --git a/ui/views/view_text_utils.cc b/ui/views/view_text_utils.cc
index 18cc40dbeb..c4c81fd6c1 100644
--- a/ui/views/view_text_utils.cc
+++ b/ui/views/view_text_utils.cc
@@ -7,7 +7,7 @@
#include "base/i18n/bidi_line_iterator.h"
#include "base/i18n/break_iterator.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index a5ccc2efe8..aa9457c8b1 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -7,7 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/rand_util.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_strings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/accelerators/accelerator.h"
@@ -3367,7 +3367,7 @@ TEST_F(ViewLayerTest, AcquireLayer) {
}
// Verify that new layer scales content only if the old layer does.
-TEST_F(ViewLayerTest, RecreateLayer) {
+TEST_F(ViewLayerTest, RecreateLayerScaling) {
scoped_ptr<View> v(new View());
v->SetPaintToLayer(true);
// Set to non default value.
@@ -3377,6 +3377,67 @@ TEST_F(ViewLayerTest, RecreateLayer) {
EXPECT_FALSE(new_layer->scale_content());
}
+// Verify the z-order of the layers as a result of calling RecreateLayer().
+TEST_F(ViewLayerTest, RecreateLayerZOrder) {
+ scoped_ptr<View> v(new View());
+ v->SetPaintToLayer(true);
+
+ View* v1 = new View();
+ v1->SetPaintToLayer(true);
+ v->AddChildView(v1);
+ View* v2 = new View();
+ v2->SetPaintToLayer(true);
+ v->AddChildView(v2);
+
+ // Test the initial z-order.
+ const std::vector<ui::Layer*>& child_layers_pre = v->layer()->children();
+ ASSERT_EQ(2u, child_layers_pre.size());
+ EXPECT_EQ(v1->layer(), child_layers_pre[0]);
+ EXPECT_EQ(v2->layer(), child_layers_pre[1]);
+
+ scoped_ptr<ui::Layer> v1_old_layer(v1->RecreateLayer());
+
+ // Test the new layer order. |v1_old_layer| should be above the layers
+ // for |v1| and |v2|.
+ const std::vector<ui::Layer*>& child_layers_post = v->layer()->children();
+ ASSERT_EQ(3u, child_layers_post.size());
+ EXPECT_EQ(v1->layer(), child_layers_post[0]);
+ EXPECT_EQ(v2->layer(), child_layers_post[1]);
+ EXPECT_EQ(v1_old_layer, child_layers_post[2]);
+}
+
+// Verify the z-order of the layers as a result of calling RecreateLayer when
+// the widget is the parent with the layer.
+TEST_F(ViewLayerTest, RecreateLayerZOrderWidgetParent) {
+ View* v = new View();
+ widget()->SetContentsView(v);
+
+ View* v1 = new View();
+ v1->SetPaintToLayer(true);
+ v->AddChildView(v1);
+ View* v2 = new View();
+ v2->SetPaintToLayer(true);
+ v->AddChildView(v2);
+
+ ui::Layer* root_layer = GetRootLayer();
+
+ // Test the initial z-order.
+ const std::vector<ui::Layer*>& child_layers_pre = root_layer->children();
+ ASSERT_EQ(2u, child_layers_pre.size());
+ EXPECT_EQ(v1->layer(), child_layers_pre[0]);
+ EXPECT_EQ(v2->layer(), child_layers_pre[1]);
+
+ scoped_ptr<ui::Layer> v1_old_layer(v1->RecreateLayer());
+
+ // Test the new layer order. |v1_old_layer| should be above the layers
+ // for |v1| and |v2|.
+ const std::vector<ui::Layer*>& child_layers_post = root_layer->children();
+ ASSERT_EQ(3u, child_layers_post.size());
+ EXPECT_EQ(v1->layer(), child_layers_post[0]);
+ EXPECT_EQ(v2->layer(), child_layers_post[1]);
+ EXPECT_EQ(v1_old_layer, child_layers_post[2]);
+}
+
#endif // USE_AURA
} // namespace views
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 635ed67d9b..3acfcc60e2 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -24,10 +24,10 @@
'../../base/base.gyp:base',
'../../base/base.gyp:base_i18n',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../skia/skia.gyp:skia',
'../../third_party/icu/icu.gyp:icui18n',
'../../third_party/icu/icu.gyp:icuuc',
+ '../../url/url.gyp:url_lib',
'../base/strings/ui_strings.gyp:ui_strings',
'../compositor/compositor.gyp:compositor',
'../native_theme/native_theme.gyp:native_theme',
@@ -69,6 +69,8 @@
'color_constants.cc',
'color_constants.h',
'context_menu_controller.h',
+ 'controls/button/blue_button.cc',
+ 'controls/button/blue_button.h',
'controls/button/button.cc',
'controls/button/button.h',
'controls/button/button_dropdown.cc',
@@ -328,6 +330,8 @@
'view.h',
'view_constants.cc',
'view_constants.h',
+ 'view_constants_aura.cc',
+ 'view_constants_aura.h',
'view_aura.cc',
'view_model.cc',
'view_model.h',
@@ -421,6 +425,8 @@
'widget/widget_message_filter.cc',
'widget/widget_message_filter.h',
'widget/widget_observer.h',
+ 'widget/window_reorderer.cc',
+ 'widget/window_reorderer.h',
'win/fullscreen_handler.cc',
'win/fullscreen_handler.h',
'win/hwnd_message_handler.cc',
@@ -493,6 +499,8 @@
'sources/': [
['exclude', 'corewm'],
['exclude', 'widget/desktop_aura'],
+ ['exclude', 'widget/window_reorderer.h'],
+ ['exclude', 'widget/window_reorderer.cc'],
],
'sources!': [
'widget/native_widget_aura_window_observer.cc',
@@ -651,12 +659,12 @@
# factored out. (for some reason it pulls in a bunch
# unrelated things like v8, sqlite nss...).
'../../chrome/chrome_resources.gyp:packed_resources',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../skia/skia.gyp:skia',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
'../../third_party/icu/icu.gyp:icui18n',
'../../third_party/icu/icu.gyp:icuuc',
+ '../../url/url.gyp:url_lib',
'../base/strings/ui_strings.gyp:ui_strings',
'../compositor/compositor.gyp:compositor',
'../compositor/compositor.gyp:compositor_test_support',
@@ -706,6 +714,7 @@
'corewm/tooltip_controller_unittest.cc',
'corewm/visibility_controller_unittest.cc',
'corewm/window_animations_unittest.cc',
+ 'corewm/window_util_unittest.cc',
'focus/focus_manager_test.h',
'focus/focus_manager_test.cc',
'focus/focus_manager_unittest.cc',
@@ -718,11 +727,13 @@
'view_model_utils_unittest.cc',
'view_unittest.cc',
'window/dialog_client_view_unittest.cc',
+ 'window/dialog_delegate_unittest.cc',
'widget/desktop_aura/desktop_capture_client_unittest.cc',
'widget/native_widget_aura_unittest.cc',
'widget/native_widget_unittest.cc',
'widget/native_widget_win_unittest.cc',
'widget/widget_unittest.cc',
+ 'widget/window_reorderer_unittest.cc',
'run_all_unittests.cc',
],
'conditions': [
@@ -751,6 +762,12 @@
'../../base/allocator/allocator.gyp:allocator',
],
}],
+ ['OS=="linux" and linux_use_tcmalloc==1', {
+ # See http://crbug.com/162998#c4 for why this is needed.
+ 'dependencies': [
+ '../../base/allocator/allocator.gyp:allocator',
+ ],
+ }],
[ 'use_aura==1', {
'dependencies': [
'../aura/aura.gyp:aura_test_support',
@@ -766,6 +783,7 @@
'sources/': [
['exclude', 'corewm'],
['exclude', 'widget/desktop_aura'],
+ ['exclude', 'widget/window_reorderer_unittest.cc']
],
}],
],
@@ -863,12 +881,12 @@
'dependencies': [
'../../base/base.gyp:base',
'../../base/base.gyp:base_i18n',
- '../../build/temp_gyp/googleurl.gyp:googleurl',
'../../chrome/chrome_resources.gyp:packed_resources',
'../../content/content.gyp:content',
'../../skia/skia.gyp:skia',
'../../third_party/icu/icu.gyp:icui18n',
'../../third_party/icu/icu.gyp:icuuc',
+ '../../url/url.gyp:url_lib',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
'controls/webview/webview.gyp:webview',
@@ -998,7 +1016,6 @@
['use_aura==1', {
'dependencies': [
'../compositor/compositor.gyp:compositor',
- '../compositor/compositor.gyp:compositor_test_support',
],
}],
['OS=="win"', {
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h
index 72aaeeaa8e..8a83d29090 100644
--- a/ui/views/views_delegate.h
+++ b/ui/views/views_delegate.h
@@ -18,6 +18,10 @@
#include "ui/views/views_export.h"
#include "ui/views/widget/widget.h"
+namespace base {
+class TimeDelta;
+}
+
namespace content {
class WebContents;
class BrowserContext;
@@ -108,7 +112,10 @@ class VIEWS_EXPORT ViewsDelegate {
// Gives the platform a chance to modify the properties of a Widget.
virtual void OnBeforeWidgetInit(Widget::InitParams* params,
- internal::NativeWidgetDelegate* delegate) = 0;
+ internal::NativeWidgetDelegate* delegate) = 0;
+
+ // Returns the default obscured text reveal duration.
+ virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() = 0;
private:
scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_;
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 26828e00f9..c4634c3063 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -41,6 +41,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_aura_utils.h"
#include "ui/views/widget/widget_delegate.h"
+#include "ui/views/widget/window_reorderer.h"
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT,
views::DesktopNativeWidgetAura*);
@@ -274,6 +275,9 @@ void DesktopNativeWidgetAura::InitNativeWidget(
shadow_controller_.reset(
new corewm::ShadowController(
aura::client::GetActivationClient(root_window_.get())));
+
+ window_reorderer_.reset(new WindowReorderer(window_,
+ GetWidget()->GetRootView()));
}
NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() {
@@ -320,6 +324,10 @@ ui::Layer* DesktopNativeWidgetAura::GetLayer() {
return window_->layer();
}
+void DesktopNativeWidgetAura::ReorderNativeViews() {
+ window_reorderer_->ReorderChildWindows();
+}
+
void DesktopNativeWidgetAura::ViewRemoved(View* view) {
}
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
index d46f0ba3ea..fed511c26a 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -37,6 +37,7 @@ class DesktopRootWindowHost;
class DropHelper;
class NativeWidgetAuraWindowObserver;
class TooltipManagerAura;
+class WindowReorderer;
class VIEWS_EXPORT DesktopNativeWidgetAura
: public internal::NativeWidgetPrivate,
@@ -82,6 +83,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
virtual const ui::Compositor* GetCompositor() const OVERRIDE;
virtual ui::Compositor* GetCompositor() OVERRIDE;
virtual ui::Layer* GetLayer() OVERRIDE;
+ virtual void ReorderNativeViews() OVERRIDE;
virtual void ViewRemoved(View* view) OVERRIDE;
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
@@ -244,6 +246,10 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
scoped_ptr<corewm::ShadowController> shadow_controller_;
+ // Reorders child windows of |window_| associated with a view based on the
+ // order of the associated views in the widget's view hierarchy.
+ scoped_ptr<WindowReorderer> window_reorderer_;
+
DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
};
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index 75537abbc5..8c936a7993 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -695,7 +695,7 @@ void DesktopRootWindowHostWin::HandleCreate() {
// TODO(beng): moar
NOTIMPLEMENTED();
- native_widget_delegate_->OnNativeWidgetCreated();
+ native_widget_delegate_->OnNativeWidgetCreated(true);
// 1. Window property association
// 2. MouseWheel.
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 1ad0e76e49..94e3e36145 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -10,7 +10,7 @@
#include "base/message_pump_aurax11.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/client/user_action_client.h"
#include "ui/aura/focus_manager.h"
@@ -74,7 +74,6 @@ const char* kAtomsToCache[] = {
"_NET_WM_STATE_HIDDEN",
"_NET_WM_STATE_MAXIMIZED_HORZ",
"_NET_WM_STATE_MAXIMIZED_VERT",
- "_NET_WM_WINDOW_OPACITY",
"XdndActionAsk",
"XdndActionCopy"
"XdndActionLink",
@@ -241,7 +240,7 @@ aura::RootWindow* DesktopRootWindowHostX11::InitRootWindow(
if (!params.child && params.parent)
parent->AddTransientChild(content_window_);
- native_widget_delegate_->OnNativeWidgetCreated();
+ native_widget_delegate_->OnNativeWidgetCreated(true);
capture_client_.reset(new views::DesktopCaptureClient(root_window_));
aura::client::SetCaptureClient(root_window_, capture_client_.get());
@@ -638,20 +637,8 @@ bool DesktopRootWindowHostX11::IsFullscreen() const {
}
void DesktopRootWindowHostX11::SetOpacity(unsigned char opacity) {
- // X server opacity is in terms of 32 bit unsigned int space, and counts from
- // the opposite direction.
- unsigned int cardinality = (255 - opacity) * 0x1010101;
-
- if (cardinality == 0xffffffff) {
- XDeleteProperty(xdisplay_, xwindow_,
- atom_cache_.GetAtom("_NET_WM_WINDOW_OPACITY"));
- } else {
- XChangeProperty(xdisplay_, xwindow_,
- atom_cache_.GetAtom("_NET_WM_WINDOW_OPACITY"),
- XA_CARDINAL, 32,
- PropModeReplace,
- reinterpret_cast<unsigned char*>(&cardinality), 1);
- }
+ // TODO(erg):
+ NOTIMPLEMENTED();
}
void DesktopRootWindowHostX11::SetWindowIcons(
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 37a6e41fac..4e435ba975 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -39,6 +39,7 @@
#include "ui/views/widget/tooltip_manager_aura.h"
#include "ui/views/widget/widget_aura_utils.h"
#include "ui/views/widget/widget_delegate.h"
+#include "ui/views/widget/window_reorderer.h"
#if defined(OS_WIN)
#include "base/win/scoped_gdi_object.h"
@@ -110,7 +111,7 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
if (params.type == Widget::InitParams::TYPE_CONTROL)
window_->Show();
- delegate_->OnNativeWidgetCreated();
+ delegate_->OnNativeWidgetCreated(false);
gfx::Rect window_bounds = params.bounds;
gfx::NativeView parent = params.parent;
@@ -152,8 +153,9 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
else
SetBounds(window_bounds);
window_->set_ignore_events(!params.accept_events);
- can_activate_ =
- params.can_activate && params.type != Widget::InitParams::TYPE_CONTROL;
+ can_activate_ = params.can_activate &&
+ params.type != Widget::InitParams::TYPE_CONTROL &&
+ params.type != Widget::InitParams::TYPE_TOOLTIP;
DCHECK(GetWidget()->GetRootView());
#if !defined(OS_MACOSX)
if (params.type != Widget::InitParams::TYPE_TOOLTIP)
@@ -172,6 +174,9 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
GetWidget()->widget_delegate()->CanMaximize());
window_->SetProperty(aura::client::kCanResizeKey,
GetWidget()->widget_delegate()->CanResize());
+
+ window_reorderer_.reset(new WindowReorderer(window_,
+ GetWidget()->GetRootView()));
}
NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() {
@@ -223,6 +228,10 @@ ui::Layer* NativeWidgetAura::GetLayer() {
return window_->layer();
}
+void NativeWidgetAura::ReorderNativeViews() {
+ window_reorderer_->ReorderChildWindows();
+}
+
void NativeWidgetAura::ViewRemoved(View* view) {
DCHECK(drop_helper_.get() != NULL);
drop_helper_->ResetTargetViewIfEquals(view);
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index 3dc64d6159..c40901a28c 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -29,6 +29,7 @@ namespace views {
class DropHelper;
class NativeWidgetAuraWindowObserver;
class TooltipManagerAura;
+class WindowReorderer;
class VIEWS_EXPORT NativeWidgetAura
: public internal::NativeWidgetPrivate,
@@ -58,6 +59,7 @@ class VIEWS_EXPORT NativeWidgetAura
virtual const ui::Compositor* GetCompositor() const OVERRIDE;
virtual ui::Compositor* GetCompositor() OVERRIDE;
virtual ui::Layer* GetLayer() OVERRIDE;
+ virtual void ReorderNativeViews() OVERRIDE;
virtual void ViewRemoved(View* view) OVERRIDE;
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
@@ -205,6 +207,10 @@ class VIEWS_EXPORT NativeWidgetAura
scoped_ptr<TooltipManagerAura> tooltip_manager_;
+ // Reorders child windows of |window_| associated with a view based on the
+ // order of the associated views in the widget's view hierarchy.
+ scoped_ptr<WindowReorderer> window_reorderer_;
+
scoped_ptr<NativeWidgetAuraWindowObserver> active_window_observer_;
scoped_ptr<DropHelper> drop_helper_;
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index 13e7de542e..ae8b22352b 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -315,8 +315,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
// Verifies views with layers are targeted for events properly.
TEST_F(NativeWidgetAuraTest, PreferViewLayersToChildWindows) {
- // Create two widget, |parent_root| and |child|. |child| is a child of
- // |parent_root|.
+ // Create two widgets: |parent| and |child|. |child| is a child of |parent|.
views::View* parent_root = new views::View;
scoped_ptr<Widget> parent(new Widget());
Widget::InitParams parent_params(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -341,13 +340,21 @@ TEST_F(NativeWidgetAuraTest, PreferViewLayersToChildWindows) {
parent->GetNativeWindow()->GetEventHandlerForPoint(
gfx::Point(50, 50)));
- // Create a view with a layer and stack it at the top (above |child|).
+ // Create a view with a layer and stack it at the bottom (below |child|).
views::View* view_with_layer = new views::View;
parent_root->AddChildView(view_with_layer);
view_with_layer->SetBounds(0, 0, 50, 50);
view_with_layer->SetPaintToLayer(true);
- // Point is over |view_with_layer|, it should get the event.
+ // Make sure that |child| still gets the event.
+ EXPECT_EQ(child->GetNativeWindow(),
+ parent->GetNativeWindow()->GetEventHandlerForPoint(
+ gfx::Point(20, 20)));
+
+ // Move |view_with_layer| to the top and make sure it gets the
+ // event when the point is within |view_with_layer|'s bounds.
+ view_with_layer->layer()->parent()->StackAtTop(
+ view_with_layer->layer());
EXPECT_EQ(parent->GetNativeWindow(),
parent->GetNativeWindow()->GetEventHandlerForPoint(
gfx::Point(20, 20)));
@@ -357,13 +364,6 @@ TEST_F(NativeWidgetAuraTest, PreferViewLayersToChildWindows) {
parent->GetNativeWindow()->GetEventHandlerForPoint(
gfx::Point(70, 70)));
- // Move |child| to the top and make sure it gets the event.
- child->GetNativeWindow()->layer()->parent()->StackAtTop(
- child->GetNativeWindow()->layer());
- EXPECT_EQ(child->GetNativeWindow(),
- parent->GetNativeWindow()->GetEventHandlerForPoint(
- gfx::Point(20, 20)));
-
delete view_with_layer;
view_with_layer = NULL;
diff --git a/ui/views/widget/native_widget_delegate.h b/ui/views/widget/native_widget_delegate.h
index 40bdedc5f1..c1fd073370 100644
--- a/ui/views/widget/native_widget_delegate.h
+++ b/ui/views/widget/native_widget_delegate.h
@@ -65,7 +65,9 @@ class VIEWS_EXPORT NativeWidgetDelegate {
virtual void OnNativeWidgetVisibilityChanged(bool visible) = 0;
// Called when the native widget is created.
- virtual void OnNativeWidgetCreated() = 0;
+ // The |desktop_widget| bool is true for widgets created in the desktop and
+ // false for widgets created in the shell.
+ virtual void OnNativeWidgetCreated(bool desktop_widget) = 0;
// Called just before the native widget is destroyed. This is the delegate's
// last chance to do anything with the native widget handle.
diff --git a/ui/views/widget/native_widget_private.h b/ui/views/widget/native_widget_private.h
index 2bb61c0bb5..b9cc7af0d2 100644
--- a/ui/views/widget/native_widget_private.h
+++ b/ui/views/widget/native_widget_private.h
@@ -100,6 +100,15 @@ class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget {
// Returns the NativeWidget's layer, if any.
virtual ui::Layer* GetLayer() = 0;
+ // Reorders the widget's child NativeViews which are associated to the view
+ // tree (eg via a NativeViewHost) to match the z-order of the views in the
+ // view tree. The z-order of views with layers relative to views with
+ // associated NativeViews is used to reorder the NativeView layers. This
+ // method assumes that the widget's child layers which are owned by a view are
+ // already in the correct z-order relative to each other and does no
+ // reordering if there are no views with an associated NativeView.
+ virtual void ReorderNativeViews() = 0;
+
// Notifies the NativeWidget that a view was removed from the Widget's view
// hierarchy.
virtual void ViewRemoved(View* view) = 0;
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index 59abe0beb9..25a9c89597 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -161,6 +161,9 @@ ui::Layer* NativeWidgetWin::GetLayer() {
return NULL;
}
+void NativeWidgetWin::ReorderNativeViews() {
+}
+
void NativeWidgetWin::ViewRemoved(View* view) {
if (drop_target_.get())
drop_target_->ResetTargetViewIfEquals(view);
@@ -640,7 +643,7 @@ void NativeWidgetWin::HandleCreate() {
tooltip_manager_.reset();
}
- delegate_->OnNativeWidgetCreated();
+ delegate_->OnNativeWidgetCreated(true);
}
void NativeWidgetWin::HandleDestroying() {
diff --git a/ui/views/widget/native_widget_win.h b/ui/views/widget/native_widget_win.h
index 85f1e841b3..a2c3f918a9 100644
--- a/ui/views/widget/native_widget_win.h
+++ b/ui/views/widget/native_widget_win.h
@@ -80,6 +80,7 @@ class VIEWS_EXPORT NativeWidgetWin : public internal::NativeWidgetPrivate,
virtual const ui::Compositor* GetCompositor() const OVERRIDE;
virtual ui::Compositor* GetCompositor() OVERRIDE;
virtual ui::Layer* GetLayer() OVERRIDE;
+ virtual void ReorderNativeViews() OVERRIDE;
virtual void ViewRemoved(View* view) OVERRIDE;
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
diff --git a/ui/views/widget/tooltip_manager.cc b/ui/views/widget/tooltip_manager.cc
index 500b2a4106..bfcbf02b47 100644
--- a/ui/views/widget/tooltip_manager.cc
+++ b/ui/views/widget/tooltip_manager.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/text/text_elider.h"
namespace {
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index c78d90c11c..cbf7f432d1 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -7,7 +7,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/base/default_theme_provider.h"
#include "ui/base/events/event.h"
#include "ui/base/hit_test.h"
@@ -884,6 +884,10 @@ ui::Layer* Widget::GetLayer() {
return native_widget_->GetLayer();
}
+void Widget::ReorderNativeViews() {
+ native_widget_->ReorderNativeViews();
+}
+
void Widget::UpdateRootLayers() {
// Calculate the layers requires traversing the tree, and since nearly any
// mutation of the tree can trigger this call we delay until absolutely
@@ -1013,9 +1017,9 @@ void Widget::OnNativeWidgetVisibilityChanged(bool visible) {
root->layer()->SetVisible(visible);
}
-void Widget::OnNativeWidgetCreated() {
+void Widget::OnNativeWidgetCreated(bool desktop_widget) {
if (is_top_level())
- focus_manager_.reset(FocusManagerFactory::Create(this));
+ focus_manager_.reset(FocusManagerFactory::Create(this, desktop_widget));
native_widget_->InitModalType(widget_delegate_->GetModalType());
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 6246faab7f..a93427fbda 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -573,6 +573,15 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Returns the widget's layer, if any.
ui::Layer* GetLayer();
+ // Reorders the widget's child NativeViews which are associated to the view
+ // tree (eg via a NativeViewHost) to match the z-order of the views in the
+ // view tree. The z-order of views with layers relative to views with
+ // associated NativeViews is used to reorder the NativeView layers. This
+ // method assumes that the widget's child layers which are owned by a view are
+ // already in the correct z-order relative to each other and does no
+ // reordering if there are no views with an associated NativeView.
+ void ReorderNativeViews();
+
// Schedules an update to the root layers. The actual processing occurs when
// GetRootLayers() is invoked.
void UpdateRootLayers();
@@ -654,7 +663,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
virtual void OnNativeFocus(gfx::NativeView old_focused_view) OVERRIDE;
virtual void OnNativeBlur(gfx::NativeView new_focused_view) OVERRIDE;
virtual void OnNativeWidgetVisibilityChanged(bool visible) OVERRIDE;
- virtual void OnNativeWidgetCreated() OVERRIDE;
+ virtual void OnNativeWidgetCreated(bool desktop_widget) OVERRIDE;
virtual void OnNativeWidgetDestroying() OVERRIDE;
virtual void OnNativeWidgetDestroyed() OVERRIDE;
virtual gfx::Size GetMinimumSize() OVERRIDE;
diff --git a/ui/views/widget/widget_delegate.cc b/ui/views/widget/widget_delegate.cc
index 1af0254ba4..bf73efc4f2 100644
--- a/ui/views/widget/widget_delegate.cc
+++ b/ui/views/widget/widget_delegate.cc
@@ -4,7 +4,7 @@
#include "ui/views/widget/widget_delegate.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/view.h"
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 49446e2f29..d93e0c42c3 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/events/event_utils.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/ui/views/widget/window_reorderer.cc b/ui/views/widget/window_reorderer.cc
new file mode 100644
index 0000000000..dcf51c83c8
--- /dev/null
+++ b/ui/views/widget/window_reorderer.cc
@@ -0,0 +1,201 @@
+// Copyright 2013 The Chromium Authors. 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/widget/window_reorderer.h"
+
+#include <map>
+#include <vector>
+
+#include "ui/aura/window.h"
+#include "ui/views/view.h"
+#include "ui/views/view_constants_aura.h"
+
+namespace views {
+
+namespace {
+
+// Sets |hosted_windows| to a mapping of the views with an associated window to
+// the window that they are associated to. Only views associated to a child of
+// |parent_window| are returned.
+void GetViewsWithAssociatedWindow(
+ const aura::Window& parent_window,
+ std::map<views::View*, aura::Window*>* hosted_windows) {
+ const std::vector<aura::Window*>& child_windows = parent_window.children();
+ for (size_t i = 0; i < child_windows.size(); ++i) {
+ aura::Window* child = child_windows[i];
+ View* host_view = child->GetProperty(kHostViewKey);
+ if (host_view)
+ (*hosted_windows)[host_view] = child;
+ }
+}
+
+// Sets |order| to the list of views whose layer / associated window's layer
+// is a child of |parent_layer|. |order| is sorted in ascending z-order of
+// the views.
+// |hosts| are the views with an associated window whose layer is a child of
+// |parent_layer|.
+void GetOrderOfViewsWithLayers(
+ views::View* view,
+ ui::Layer* parent_layer,
+ const std::map<views::View*, aura::Window*>& hosts,
+ std::vector<views::View*>* order) {
+ DCHECK(view);
+ DCHECK(parent_layer);
+ DCHECK(order);
+ if (view->layer() && view->layer()->parent() == parent_layer) {
+ order->push_back(view);
+ // |hosts| may contain a child of |view|.
+ } else if (hosts.find(view) != hosts.end()) {
+ order->push_back(view);
+ }
+
+ for (int i = 0; i < view->child_count(); ++i)
+ GetOrderOfViewsWithLayers(view->child_at(i), parent_layer, hosts, order);
+}
+
+} // namespace
+
+// Class which reorders windows as a result of the kHostViewKey property being
+// set on the window.
+class WindowReorderer::AssociationObserver : public aura::WindowObserver {
+ public:
+ explicit AssociationObserver(WindowReorderer* reorderer);
+ virtual ~AssociationObserver();
+
+ // Start/stop observing changes in the kHostViewKey property on |window|.
+ void StartObserving(aura::Window* window);
+ void StopObserving(aura::Window* window);
+
+ private:
+ // aura::WindowObserver overrides:
+ virtual void OnWindowPropertyChanged(aura::Window* window,
+ const void* key,
+ intptr_t old) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+
+ // Not owned.
+ WindowReorderer* reorderer_;
+
+ std::set<aura::Window*> windows_;
+
+ DISALLOW_COPY_AND_ASSIGN(AssociationObserver);
+};
+
+WindowReorderer::AssociationObserver::AssociationObserver(
+ WindowReorderer* reorderer)
+ : reorderer_(reorderer) {
+}
+
+WindowReorderer::AssociationObserver::~AssociationObserver() {
+ while (!windows_.empty())
+ StopObserving(*windows_.begin());
+}
+
+void WindowReorderer::AssociationObserver::StartObserving(
+ aura::Window* window) {
+ windows_.insert(window);
+ window->AddObserver(this);
+}
+
+void WindowReorderer::AssociationObserver::StopObserving(
+ aura::Window* window) {
+ windows_.erase(window);
+ window->RemoveObserver(this);
+}
+
+void WindowReorderer::AssociationObserver::OnWindowPropertyChanged(
+ aura::Window* window,
+ const void* key,
+ intptr_t old) {
+ if (key == kHostViewKey)
+ reorderer_->ReorderChildWindows();
+}
+
+void WindowReorderer::AssociationObserver::OnWindowDestroying(
+ aura::Window* window) {
+ windows_.erase(window);
+ window->RemoveObserver(this);
+}
+
+WindowReorderer::WindowReorderer(aura::Window* parent_window,
+ View* root_view)
+ : parent_window_(parent_window),
+ root_view_(root_view),
+ association_observer_(new AssociationObserver(this)) {
+ parent_window_->AddObserver(this);
+ const std::vector<aura::Window*>& windows = parent_window_->children();
+ for (size_t i = 0; i < windows.size(); ++i)
+ association_observer_->StartObserving(windows[i]);
+ ReorderChildWindows();
+}
+
+WindowReorderer::~WindowReorderer() {
+ if (parent_window_) {
+ parent_window_->RemoveObserver(this);
+ // |association_observer_| stops observing any windows it is observing upon
+ // destruction.
+ }
+}
+
+void WindowReorderer::ReorderChildWindows() {
+ if (!parent_window_)
+ return;
+
+ std::map<View*, aura::Window*> hosted_windows;
+ GetViewsWithAssociatedWindow(*parent_window_, &hosted_windows);
+
+ if (hosted_windows.empty()) {
+ // Exit early if there are no views with associated windows.
+ // View::ReorderLayers() should have already reordered the layers owned by
+ // views.
+ return;
+ }
+
+ // Compute the desired z-order of the layers based on the order of the views
+ // with layers and views with associated windows in the view tree.
+ std::vector<View*> view_with_layer_order;
+ GetOrderOfViewsWithLayers(root_view_, parent_window_->layer(), hosted_windows,
+ &view_with_layer_order);
+
+ // For the sake of simplicity, reorder both the layers owned by views and the
+ // layers of windows associated with a view. Iterate through
+ // |view_with_layer_order| backwards and stack windows at the bottom so that
+ // windows not associated to a view are stacked above windows with an
+ // associated view.
+ for (std::vector<View*>::reverse_iterator it = view_with_layer_order.rbegin();
+ it != view_with_layer_order.rend(); ++it) {
+ View* view = *it;
+ ui::Layer* layer = view->layer();
+ aura::Window* window = NULL;
+
+ std::map<View*, aura::Window*>::iterator hosted_window_it =
+ hosted_windows.find(view);
+ if (hosted_window_it != hosted_windows.end()) {
+ window = hosted_window_it->second;
+ layer = window->layer();
+ }
+
+ DCHECK(layer);
+ if (window)
+ parent_window_->StackChildAtBottom(window);
+ parent_window_->layer()->StackAtBottom(layer);
+ }
+}
+
+void WindowReorderer::OnWindowAdded(aura::Window* new_window) {
+ association_observer_->StartObserving(new_window);
+ ReorderChildWindows();
+}
+
+void WindowReorderer::OnWillRemoveWindow(aura::Window* window) {
+ association_observer_->StopObserving(window);
+}
+
+void WindowReorderer::OnWindowDestroying(aura::Window* window) {
+ parent_window_->RemoveObserver(this);
+ parent_window_ = NULL;
+ association_observer_.reset();
+}
+
+} // namespace views
diff --git a/ui/views/widget/window_reorderer.h b/ui/views/widget/window_reorderer.h
new file mode 100644
index 0000000000..b04e48f890
--- /dev/null
+++ b/ui/views/widget/window_reorderer.h
@@ -0,0 +1,59 @@
+// Copyright 2013 The Chromium Authors. 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_VIEWS_WIDGET_WINDOW_REORDERER_H_
+#define UI_VIEWS_WIDGET_WINDOW_REORDERER_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/aura/window_observer.h"
+
+namespace aura {
+class Window;
+}
+
+namespace views {
+class View;
+
+// Class which reorders the widget's child windows which have an associated view
+// in the widget's view tree according the z-order of the views in the view
+// tree. Windows not associated to a view are stacked above windows with an
+// associated view. The child windows' layers are additionally reordered
+// according to the z-order of the associated views relative to views with
+// layers.
+class WindowReorderer : public aura::WindowObserver {
+ public:
+ WindowReorderer(aura::Window* window, View* root_view);
+ virtual ~WindowReorderer();
+
+ // Explicitly reorder the children of |window_| (and their layers). This
+ // method should be called when the position of a view with an associated
+ // window changes in the view hierarchy. This method assumes that the
+ // child layers of |window_| which are owned by views are already in the
+ // correct z-order relative to each other and does no reordering if there
+ // are no views with an associated window.
+ void ReorderChildWindows();
+
+ private:
+ // aura::WindowObserver overrides:
+ virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
+ virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+
+ // The window and the root view of the native widget which owns the
+ // WindowReorderer.
+ aura::Window* parent_window_;
+ View* root_view_;
+
+ // Reorders windows as a result of the kHostViewKey being set on a child of
+ // |parent_window_|.
+ class AssociationObserver;
+ scoped_ptr<AssociationObserver> association_observer_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowReorderer);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_WINDOW_REORDERER_H_
diff --git a/ui/views/widget/window_reorderer_unittest.cc b/ui/views/widget/window_reorderer_unittest.cc
new file mode 100644
index 0000000000..1d9566c916
--- /dev/null
+++ b/ui/views/widget/window_reorderer_unittest.cc
@@ -0,0 +1,263 @@
+// Copyright 2013 The Chromium Authors. 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/aura/root_window.h"
+#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/test/test_windows.h"
+#include "ui/aura/window.h"
+#include "ui/compositor/layer.h"
+#include "ui/compositor/test/test_layers.h"
+#include "ui/views/view.h"
+#include "ui/views/view_constants_aura.h"
+#include "ui/views/widget/widget.h"
+
+namespace views {
+namespace {
+
+// Creates a control widget with the passed in parameters.
+// The caller takes ownership of the returned widget.
+Widget* CreateControlWidget(aura::Window* parent, const gfx::Rect& bounds) {
+ Widget::InitParams params(Widget::InitParams::TYPE_CONTROL);
+ params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
+ params.parent = parent;
+ params.bounds = bounds;
+ Widget* widget = new Widget();
+ widget->Init(params);
+ return widget;
+}
+
+// Sets the name of |window| and |window|'s layer to |name|.
+void SetWindowAndLayerName(aura::Window* window, const std::string& name) {
+ window->SetName(name);
+ window->layer()->set_name(name);
+}
+
+// Returns a string containing the name of each of the child windows (bottommost
+// first) of |parent|. The format of the string is "name1 name2 name3 ...".
+std::string ChildWindowNamesAsString(const aura::Window& parent) {
+ std::string names;
+ typedef std::vector<aura::Window*> Windows;
+ for (Windows::const_iterator it = parent.children().begin();
+ it != parent.children().end(); ++it) {
+ if (!names.empty())
+ names += " ";
+ names += (*it)->name();
+ }
+ return names;
+}
+
+typedef aura::test::AuraTestBase WindowReordererTest;
+
+// Test that views with layers and views with associated windows are reordered
+// according to the view hierarchy.
+TEST_F(WindowReordererTest, Basic) {
+ scoped_ptr<Widget> parent(CreateControlWidget(root_window(),
+ gfx::Rect(0, 0, 100, 100)));
+ parent->Show();
+ aura::Window* parent_window = parent->GetNativeWindow();
+
+ View* contents_view = new View();
+ parent->SetContentsView(contents_view);
+
+ // 1) Test that layers for views and layers for windows associated to a host
+ // view are stacked below the layers for any windows not associated to a host
+ // view.
+ View* v = new View();
+ v->SetPaintToLayer(true);
+ v->layer()->set_name("v");
+ contents_view->AddChildView(v);
+
+ scoped_ptr<Widget> w1(CreateControlWidget(parent_window,
+ gfx::Rect(0, 1, 100, 101)));
+ SetWindowAndLayerName(w1->GetNativeView(), "w1");
+ w1->Show();
+ scoped_ptr<Widget> w2(CreateControlWidget(parent_window,
+ gfx::Rect(0, 2, 100, 102)));
+ SetWindowAndLayerName(w2->GetNativeView(), "w2");
+ w2->Show();
+
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v w1 w2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ View* host_view2 = new View();
+ contents_view->AddChildView(host_view2);
+ w2->GetNativeView()->SetProperty(kHostViewKey, host_view2);
+ EXPECT_EQ("w2 w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v w2 w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ View* host_view1 = new View();
+ w1->GetNativeView()->SetProperty(kHostViewKey, host_view1);
+ contents_view->AddChildViewAt(host_view1, 0);
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w1 v w2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // 2) Test the z-order of the windows and layers as a result of reordering the
+ // views.
+ contents_view->ReorderChildView(host_view1, -1);
+ EXPECT_EQ("w2 w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v w2 w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ contents_view->ReorderChildView(host_view2, -1);
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v w1 w2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // 3) Test the z-order of the windows and layers as a result of reordering the
+ // views in situations where the window order remains unchanged.
+ contents_view->ReorderChildView(v, -1);
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w1 w2 v",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ contents_view->ReorderChildView(host_view2, -1);
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w1 v w2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // Work around for bug in NativeWidgetAura.
+ // TODO: fix bug and remove this.
+ parent->Close();
+}
+
+// Test that different orderings of:
+// - adding a window to a parent widget
+// - adding a "host" view to a parent widget
+// - associating the "host" view and window
+// all correctly reorder the child windows and layers.
+TEST_F(WindowReordererTest, Association) {
+ scoped_ptr<Widget> parent(CreateControlWidget(root_window(),
+ gfx::Rect(0, 0, 100, 100)));
+ parent->Show();
+ aura::Window* parent_window = parent->GetNativeWindow();
+
+ View* contents_view = new View();
+ parent->SetContentsView(contents_view);
+
+ aura::Window* w1 = aura::test::CreateTestWindowWithId(0,
+ parent->GetNativeWindow());
+ SetWindowAndLayerName(w1, "w1");
+
+ aura::Window* w2 = aura::test::CreateTestWindowWithId(0, NULL);
+ SetWindowAndLayerName(w2, "w2");
+
+ View* host_view2 = new View();
+
+ // 1) Test that parenting the window to the parent widget last results in a
+ // correct ordering of child windows and layers.
+ contents_view->AddChildView(host_view2);
+ w2->SetProperty(views::kHostViewKey, host_view2);
+ EXPECT_EQ("w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ parent_window->AddChild(w2);
+ EXPECT_EQ("w2 w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w2 w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // 2) Test that associating the window and "host" view last results in a
+ // correct ordering of child windows and layers.
+ View* host_view1 = new View();
+ contents_view->AddChildViewAt(host_view1, 0);
+ EXPECT_EQ("w2 w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w2 w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ w1->SetProperty(views::kHostViewKey, host_view1);
+ EXPECT_EQ("w1 w2", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w1 w2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // 3) Test that parenting the "host" view to the parent widget last results
+ // in a correct ordering of child windows and layers.
+ contents_view->RemoveChildView(host_view2);
+ contents_view->AddChildViewAt(host_view2, 0);
+ EXPECT_EQ("w2 w1", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("w2 w1",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // Work around for bug in NativeWidgetAura.
+ // TODO: fix bug and remove this.
+ parent->Close();
+}
+
+// It is possible to associate a window to a view which has a parent layer
+// (other than the widget layer). In this case, the parent layer of the host
+// view and the parent layer of the associated window are different. Test that
+// the layers and windows are properly reordered in this case.
+TEST_F(WindowReordererTest, HostViewParentHasLayer) {
+ scoped_ptr<Widget> parent(CreateControlWidget(root_window(),
+ gfx::Rect(0, 0, 100, 100)));
+ parent->Show();
+ aura::Window* parent_window = parent->GetNativeWindow();
+
+ View* contents_view = new View();
+ parent->SetContentsView(contents_view);
+
+ // Create the following view hierarchy. (*) denotes views which paint to a
+ // layer.
+ //
+ // contents_view
+ // +-- v1
+ // +-- v11*
+ // +-- v12 (attached window)
+ // +-- v13*
+ // +--v2*
+
+ View* v1 = new View();
+ contents_view->AddChildView(v1);
+
+ View* v11 = new View();
+ v11->SetPaintToLayer(true);
+ v11->layer()->set_name("v11");
+ v1->AddChildView(v11);
+
+ scoped_ptr<Widget> w(CreateControlWidget(parent_window,
+ gfx::Rect(0, 1, 100, 101)));
+ SetWindowAndLayerName(w->GetNativeView(), "w");
+ w->Show();
+
+ View* v12 = new View();
+ v1->AddChildView(v12);
+ w->GetNativeView()->SetProperty(kHostViewKey, v12);
+
+ View* v13 = new View();
+ v13->SetPaintToLayer(true);
+ v13->layer()->set_name("v13");
+ v1->AddChildView(v13);
+
+ View* v2 = new View();
+ v2->SetPaintToLayer(true);
+ v2->layer()->set_name("v2");
+ contents_view->AddChildView(v2);
+
+ // Test intial state.
+ EXPECT_EQ("w", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v11 w v13 v2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // |w|'s layer should be stacked above |v1|'s layer.
+ v1->SetPaintToLayer(true);
+ v1->layer()->set_name("v1");
+ EXPECT_EQ("w", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v1 w v2",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // Test moving the host view from one view with a layer to another.
+ v2->AddChildView(v12);
+ EXPECT_EQ("w", ChildWindowNamesAsString(*parent_window));
+ EXPECT_EQ("v1 v2 w",
+ ui::test::ChildLayerNamesAsString(*parent_window->layer()));
+
+ // Work around for bug in NativeWidgetAura.
+ // TODO: fix bug and remove this.
+ parent->Close();
+}
+
+} // namespace
+} // namespace views
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index 9a5ab0410a..89979541a6 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "grit/ui_strings.h"
#include "ui/base/hit_test.h"
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index b6d1695f3f..08d2cfc499 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -40,13 +40,6 @@ DialogClientView::DialogClientView(Widget* owner, View* contents_view)
extra_view_(NULL),
footnote_view_(NULL),
notified_delegate_(false) {
- // When using the new style, the background color is set on the bubble frame,
- // so a transparent background is fine.
- if (!DialogDelegate::UseNewStyle()) {
- const SkColor color = owner->GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_DialogBackground);
- set_background(views::Background::CreateSolidBackground(color));
- }
}
DialogClientView::~DialogClientView() {
@@ -263,6 +256,15 @@ void DialogClientView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
ClientView::ViewHierarchyChanged(details);
if (details.is_add && details.child == this) {
+ // The old dialog style needs an explicit background color, while the new
+ // dialog style simply inherits the bubble's frame view color.
+ const DialogDelegate* dialog = GetDialogDelegate();
+ const bool use_new_style = dialog ?
+ dialog->UseNewStyleForThisDialog() : DialogDelegate::UseNewStyle();
+ if (!use_new_style)
+ set_background(views::Background::CreateSolidBackground(GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_DialogBackground)));
+
focus_manager_ = GetFocusManager();
if (focus_manager_)
GetFocusManager()->AddFocusChangeListener(this);
diff --git a/ui/views/window/dialog_client_view_unittest.cc b/ui/views/window/dialog_client_view_unittest.cc
index a75565e8d9..e82d1ec82a 100644
--- a/ui/views/window/dialog_client_view_unittest.cc
+++ b/ui/views/window/dialog_client_view_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/basictypes.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_types.h"
#include "ui/views/test/test_views.h"
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index 3f73ebfbc0..78b437441c 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -39,7 +39,9 @@ Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog,
views::Widget* widget = new views::Widget;
views::Widget::InitParams params;
params.delegate = dialog;
- if (DialogDelegate::UseNewStyle()) {
+ const bool use_new_style = dialog ?
+ dialog->UseNewStyleForThisDialog() : DialogDelegate::UseNewStyle();
+ if (use_new_style) {
// Note: Transparent widgets cannot host native Windows textfield controls.
params.transparent = true;
params.remove_standard_frame = true;
@@ -48,7 +50,7 @@ Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog,
params.parent = parent;
params.top_level = true;
widget->Init(params);
- if (DialogDelegate::UseNewStyle()) {
+ if (use_new_style) {
#if defined(USE_AURA)
// TODO(msw): Add a matching shadow type and remove the bubble frame border?
corewm::SetShadowType(widget->GetNativeWindow(), corewm::SHADOW_TYPE_NONE);
@@ -155,8 +157,9 @@ ClientView* DialogDelegate::CreateClientView(Widget* widget) {
}
NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) {
- return UseNewStyle() ? CreateNewStyleFrameView(widget) :
- WidgetDelegate::CreateNonClientFrameView(widget);
+ if (UseNewStyleForThisDialog())
+ return CreateNewStyleFrameView(widget);
+ return WidgetDelegate::CreateNonClientFrameView(widget);
}
// static
@@ -193,6 +196,10 @@ NonClientFrameView* DialogDelegate::CreateNewStyleFrameView(
return frame;
}
+bool DialogDelegate::UseNewStyleForThisDialog() const {
+ return UseNewStyle();
+}
+
const DialogClientView* DialogDelegate::GetDialogClientView() const {
return GetWidget()->client_view()->AsDialogClientView();
}
diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h
index 401456ea64..958707c2fd 100644
--- a/ui/views/window/dialog_delegate.h
+++ b/ui/views/window/dialog_delegate.h
@@ -31,7 +31,8 @@ class VIEWS_EXPORT DialogDelegate : public ui::DialogModel,
public:
virtual ~DialogDelegate();
- // Returns whether to use the new dialog style.
+ // Returns whether to use the new dialog style in general.
+ // See UseNewStyleForThisDialog() for dialog-specific styling.
static bool UseNewStyle();
// Create a |dialog| window Widget with the specified |context| or |parent|.
@@ -96,6 +97,9 @@ class VIEWS_EXPORT DialogDelegate : public ui::DialogModel,
static NonClientFrameView* CreateNewStyleFrameView(Widget* widget,
bool force_opaque_border);
+ // Returns whether this particular dialog should use the new dialog style.
+ virtual bool UseNewStyleForThisDialog() const;
+
// Called when the window has been closed.
virtual void OnClose() {}
diff --git a/ui/views/window/dialog_delegate_unittest.cc b/ui/views/window/dialog_delegate_unittest.cc
new file mode 100644
index 0000000000..29879191e9
--- /dev/null
+++ b/ui/views/window/dialog_delegate_unittest.cc
@@ -0,0 +1,62 @@
+// Copyright 2013 The Chromium Authors. 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/base/hit_test.h"
+#include "ui/views/bubble/bubble_border.h"
+#include "ui/views/bubble/bubble_frame_view.h"
+#include "ui/views/test/views_test_base.h"
+#include "ui/views/widget/widget.h"
+#include "ui/views/window/dialog_delegate.h"
+
+namespace views {
+
+typedef ViewsTestBase DialogTest;
+
+namespace {
+
+class TestDialog : public DialogDelegateView {
+ public:
+ TestDialog() {}
+ virtual ~TestDialog() {}
+
+ // BubbleDelegateView overrides:
+ virtual gfx::Size GetPreferredSize() OVERRIDE { return gfx::Size(200, 200); }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestDialog);
+};
+
+} // namespace
+
+TEST_F(DialogTest, HitTest) {
+ TestDialog* dialog = new TestDialog();
+ DialogDelegate::CreateDialogWidget(dialog, NULL, GetContext());
+ const NonClientView* view = dialog->GetWidget()->non_client_view();
+
+ if (DialogDelegate::UseNewStyle()) {
+ // Ensure that the new style's BubbleFrameView hit-tests as expected.
+ BubbleFrameView* frame = static_cast<BubbleFrameView*>(view->frame_view());
+ const int border = frame->bubble_border()->GetBorderThickness();
+
+ struct {
+ const int point;
+ const int hit;
+ } cases[] = {
+ { border, HTSYSMENU },
+ { border + 10, HTSYSMENU },
+ { border + 20, HTCAPTION },
+ { border + 40, HTCLIENT },
+ { border + 50, HTCLIENT },
+ { 1000, HTNOWHERE },
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ gfx::Point point(cases[i].point, cases[i].point);
+ EXPECT_EQ(cases[i].hit, frame->NonClientHitTest(point))
+ << " with border: " << border << ", at point " << cases[i].point;
+ }
+ }
+}
+
+} // namespace views
diff --git a/ui/web_dialogs/test/test_web_dialog_delegate.cc b/ui/web_dialogs/test/test_web_dialog_delegate.cc
index a75fd9e6f3..da13bbd2a5 100644
--- a/ui/web_dialogs/test/test_web_dialog_delegate.cc
+++ b/ui/web_dialogs/test/test_web_dialog_delegate.cc
@@ -4,7 +4,7 @@
#include "ui/web_dialogs/test/test_web_dialog_delegate.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
using content::WebContents;
using content::WebUIMessageHandler;
diff --git a/ui/webui/OWNERS b/ui/webui/OWNERS
index b9bf5b73e9..7afe7eb966 100644
--- a/ui/webui/OWNERS
+++ b/ui/webui/OWNERS
@@ -1,8 +1,11 @@
arv@chromium.org
-jhawkins@chromium.org
-estade@chromium.org
-csilv@chromium.org
+bauerb@chromium.org
dbeam@chromium.org
+estade@chromium.org
+jhawkins@chromium.org
+nkostylev@chromium.org
+pam@chromium.org
+xiyuan@chromium.org
# temporarily for refactoring. http://crbug.com/169170
jam@chromium.org
diff --git a/ui/webui/resources/css/tree.css b/ui/webui/resources/css/tree.css
index 969c12bad2..64ae2126e2 100644
--- a/ui/webui/resources/css/tree.css
+++ b/ui/webui/resources/css/tree.css
@@ -27,6 +27,7 @@ tree {
background-image: -webkit-canvas(tree-triangle);
background-position: 50% 50%;
background-repeat: no-repeat;
+ background-size: 8px 5px;
display: inline-block;
height: 16px;
opacity: .6;
diff --git a/ui/webui/resources/css/tree.css.js b/ui/webui/resources/css/tree.css.js
index a6ce38ed68..6137a2f1b8 100644
--- a/ui/webui/resources/css/tree.css.js
+++ b/ui/webui/resources/css/tree.css.js
@@ -3,19 +3,23 @@
// found in the LICENSE file.
(function() {
- var a = 7;
- var a2 = a / 2;
- var ctx = document.getCSSCanvasContext('2d', 'tree-triangle', a + 1, a2 + 2);
+ /** @const */ var WIDTH = 14;
+ /** @const */ var HEIGHT = WIDTH / 2 + 2;
+ /** @const */ var MARGIN = 1;
+ var ctx = document.getCSSCanvasContext('2d',
+ 'tree-triangle',
+ WIDTH + MARGIN * 2,
+ HEIGHT + MARGIN * 2);
- ctx.fillStyle = '#000';
- ctx.translate(.5, .5);
+ ctx.fillStyle = '#7a7a7a';
+ ctx.translate(MARGIN, MARGIN);
ctx.beginPath();
ctx.moveTo(0, 0);
- ctx.lineTo(0, 1);
- ctx.lineTo(a2, 1 + a2);
- ctx.lineTo(a, 1);
- ctx.lineTo(a, 0);
+ ctx.lineTo(0, 2);
+ ctx.lineTo(WIDTH / 2, HEIGHT);
+ ctx.lineTo(WIDTH, 2);
+ ctx.lineTo(WIDTH, 0);
ctx.closePath();
ctx.fill();
ctx.stroke();
diff --git a/ui/webui/resources/js/cr/ui/menu_item.js b/ui/webui/resources/js/cr/ui/menu_item.js
index 82ab11163b..d1ab2ea35f 100644
--- a/ui/webui/resources/js/cr/ui/menu_item.js
+++ b/ui/webui/resources/js/cr/ui/menu_item.js
@@ -75,7 +75,8 @@ cr.define('cr.ui', function() {
if (command.id)
this.setAttribute('command', '#' + command.id);
- this.label = command.label;
+ if (typeof command.label === 'string')
+ this.label = command.label;
this.disabled = command.disabled;
this.hidden = command.hidden;
diff --git a/ui/webui/resources/js/cr/ui/menu_test.html b/ui/webui/resources/js/cr/ui/menu_test.html
new file mode 100644
index 0000000000..333f2504a7
--- /dev/null
+++ b/ui/webui/resources/js/cr/ui/menu_test.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js">
+</script>
+<script src="../../cr.js"></script>
+<script src="../event_target.js"></script>
+<script src="../ui.js"></script>
+<script src="command.js"></script>
+<script src="menu.js"></script>
+<script src="menu_item.js"></script>
+<script>
+
+goog.require('goog.testing.jsunit');
+
+</script>
+
+</head>
+<body>
+
+<script>
+
+/**
+ * Tests that if the command attributes are spacified, they are copied to the
+ * corresponding menuitem.
+ */
+function testCommandMenuItem() {
+ // Test 1: The case that the comamnd label is set.
+ var command = new cr.ui.Command();
+ command.id = 'the-command';
+ command.label = 'CommandLabel';
+ command.disabled = false;
+ command.hidden = false;
+ document.body.appendChild(command);
+
+ var menuItem = new cr.ui.MenuItem();
+ menuItem.command = '#the-command';
+
+ // Confirms the label is copied from the command.
+ assertEquals('CommandLabel', menuItem.label);
+ // Confirms the attributes are copied from the command.
+ assertEquals(false, menuItem.disabled);
+ assertEquals(false, menuItem.hidden);
+
+ // Test 2: The case that the comamnd label is not set.
+ var command2 = new cr.ui.Command();
+ command2.id = 'the-command2';
+ command2.disabled = false;
+ command2.hidden = false;
+ document.body.appendChild(command2);
+
+ var menuItem2 = new cr.ui.MenuItem();
+ menuItem2.label = 'MenuLabel';
+ menuItem2.command = '#the-command2';
+
+ // Confirms the label is not copied, keeping the original label.
+ assertEquals('MenuLabel', menuItem2.label);
+ // Confirms the attributes are copied from the command.
+ assertEquals(false, menuItem2.disabled);
+ assertEquals(false, menuItem2.hidden);
+}
+
+</script>
+
+</body>
+</html>