diff options
author | sherouk <sherouk@google.com> | 2015-08-20 07:52:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-20 14:53:25 +0000 |
commit | eeb3823b91ebe91e7f0646233a3a9861e1b5f124 (patch) | |
tree | 136d3d0392a782d9633b918b1b3213360cefc70f | |
parent | 3b4c7774526f38da8be93f8f2ceec45ed83eb8b2 (diff) | |
download | chromium_src-eeb3823b91ebe91e7f0646233a3a9861e1b5f124.zip chromium_src-eeb3823b91ebe91e7f0646233a3a9861e1b5f124.tar.gz chromium_src-eeb3823b91ebe91e7f0646233a3a9861e1b5f124.tar.bz2 |
Adding ui/base to dependencies on iOS.
Fixing ui_base_unittests to build with gn.
BUG=459705
Review URL: https://codereview.chromium.org/1291383003
Cr-Commit-Position: refs/heads/master@{#344501}
-rw-r--r-- | BUILD.gn | 2 | ||||
-rw-r--r-- | ui/base/BUILD.gn | 104 | ||||
-rw-r--r-- | ui/gfx/BUILD.gn | 49 | ||||
-rw-r--r-- | ui/gfx/color_profile.cc | 2 | ||||
-rw-r--r-- | ui/gfx/gfx.gyp | 17 |
5 files changed, 107 insertions, 67 deletions
@@ -66,6 +66,7 @@ group("both_gn_and_gyp") { deps = [ "//base:base_unittests", "//sql:sql_unittests", + "//ui/base:ui_base_unittests", ] if (!is_ios) { @@ -158,7 +159,6 @@ group("both_gn_and_gyp") { "//tools/telemetry:bitmaptools($host_toolchain)", "//ui/accessibility:accessibility_unittests", "//ui/app_list:app_list_unittests", - "//ui/base:ui_base_unittests", "//ui/display:display_unittests", "//ui/events:events_unittests", "//ui/gfx:gfx_unittests", diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index 15ad86c..eab90db 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -14,13 +14,8 @@ build_ime = !is_ios component("base") { output_name = "ui_base" + sources = [ - "accelerators/accelerator.cc", - "accelerators/accelerator.h", - "accelerators/accelerator_history.cc", - "accelerators/accelerator_history.h", - "accelerators/accelerator_manager.cc", - "accelerators/accelerator_manager.h", "accelerators/menu_label_accelerator_util_linux.cc", "accelerators/menu_label_accelerator_util_linux.h", "accelerators/platform_accelerator.h", @@ -28,13 +23,8 @@ component("base") { "accelerators/platform_accelerator_cocoa.mm", "android/ui_base_jni_registrar.cc", "android/ui_base_jni_registrar.h", - "base_window.cc", - "base_window.h", - "clipboard/clipboard.cc", - "clipboard/clipboard.h", "clipboard/clipboard_android.cc", "clipboard/clipboard_android.h", - "clipboard/clipboard_constants.cc", "clipboard/clipboard_mac.h", "clipboard/clipboard_mac.mm", "clipboard/clipboard_types.h", @@ -42,12 +32,8 @@ component("base") { "clipboard/clipboard_util_win.h", "clipboard/clipboard_win.cc", "clipboard/clipboard_win.h", - "clipboard/custom_data_helper.cc", - "clipboard/custom_data_helper.h", "clipboard/custom_data_helper_linux.cc", "clipboard/custom_data_helper_mac.mm", - "clipboard/scoped_clipboard_writer.cc", - "clipboard/scoped_clipboard_writer.h", "cocoa/animation_utils.h", "cocoa/appkit_utils.h", "cocoa/appkit_utils.mm", @@ -107,29 +93,18 @@ component("base") { "cursor/cursor.h", "cursor/cursor_android.cc", "cursor/cursor_loader.h", - "cursor/cursor_util.cc", - "cursor/cursor_util.h", "cursor/cursor_win.cc", - "cursor/cursors_aura.cc", - "cursor/cursors_aura.h", - "cursor/image_cursors.cc", - "cursor/image_cursors.h", - "default_theme_provider.cc", - "default_theme_provider.h", "default_theme_provider_mac.mm", "device_form_factor.h", "device_form_factor_android.cc", "device_form_factor_android.h", "device_form_factor_desktop.cc", "device_form_factor_ios.mm", - "dragdrop/cocoa_dnd_util.h", - "dragdrop/cocoa_dnd_util.mm", + "device_form_factor_ios.mm", "dragdrop/drag_drop_types.h", "dragdrop/drag_drop_types_win.cc", "dragdrop/drag_source_win.cc", "dragdrop/drag_source_win.h", - "dragdrop/drag_utils.cc", - "dragdrop/drag_utils.h", "dragdrop/drag_utils_aura.cc", "dragdrop/drag_utils_mac.mm", "dragdrop/drag_utils_win.cc", @@ -137,8 +112,6 @@ component("base") { "dragdrop/drop_target_event.h", "dragdrop/drop_target_win.cc", "dragdrop/drop_target_win.h", - "dragdrop/file_info.cc", - "dragdrop/file_info.h", "dragdrop/os_exchange_data.cc", "dragdrop/os_exchange_data.h", "dragdrop/os_exchange_data_provider_mac.h", @@ -222,8 +195,6 @@ component("base") { "resource/resource_handle.h", "template_expressions.cc", "template_expressions.h", - "text/bytes_formatting.cc", - "text/bytes_formatting.h", "theme_provider.cc", "theme_provider.h", "touch/selection_bound.cc", @@ -285,6 +256,42 @@ component("base") { "work_area_watcher_observer.h", ] + if (!is_ios) { + sources += [ + "accelerators/accelerator.cc", + "accelerators/accelerator.h", + "accelerators/accelerator_history.cc", + "accelerators/accelerator_history.h", + "accelerators/accelerator_manager.cc", + "accelerators/accelerator_manager.h", + "base_window.cc", + "base_window.h", + "clipboard/clipboard.cc", + "clipboard/clipboard.h", + "clipboard/clipboard_constants.cc", + "clipboard/custom_data_helper.cc", + "clipboard/custom_data_helper.h", + "clipboard/scoped_clipboard_writer.cc", + "clipboard/scoped_clipboard_writer.h", + "cursor/cursor_util.cc", + "cursor/cursor_util.h", + "cursor/cursors_aura.cc", + "cursor/cursors_aura.h", + "cursor/image_cursors.cc", + "cursor/image_cursors.h", + "default_theme_provider.cc", + "default_theme_provider.h", + "dragdrop/cocoa_dnd_util.h", + "dragdrop/cocoa_dnd_util.mm", + "dragdrop/drag_utils.cc", + "dragdrop/drag_utils.h", + "dragdrop/file_info.cc", + "dragdrop/file_info.h", + "text/bytes_formatting.cc", + "text/bytes_formatting.h", + ] + } + if (is_win) { sources += [ "touch/touch_device_win.cc" ] } else if (is_android) { @@ -325,10 +332,12 @@ component("base") { ] if (is_ios) { + set_sources_assignment_filter([]) sources += [ "l10n/l10n_util_mac.h", "l10n/l10n_util_mac.mm", ] + set_sources_assignment_filter(sources_assignment_filter) } if (toolkit_views) { @@ -567,24 +576,29 @@ source_set("test_support") { sources = [ "test/material_design_controller_test_api.cc", "test/material_design_controller_test_api.h", - "test/nswindow_fullscreen_notification_waiter.h", - "test/nswindow_fullscreen_notification_waiter.mm", - "test/scoped_fake_nswindow_focus.h", - "test/scoped_fake_nswindow_focus.mm", - "test/scoped_fake_nswindow_fullscreen.h", - "test/scoped_fake_nswindow_fullscreen.mm", - "test/test_clipboard.cc", - "test/test_clipboard.h", "test/ui_controls.h", "test/ui_controls_aura.cc", "test/ui_controls_internal_win.cc", "test/ui_controls_internal_win.h", "test/ui_controls_mac.mm", "test/ui_controls_win.cc", - "test/windowed_nsnotification_observer.h", - "test/windowed_nsnotification_observer.mm", ] + if (!is_ios) { + sources += [ + "test/nswindow_fullscreen_notification_waiter.h", + "test/nswindow_fullscreen_notification_waiter.mm", + "test/scoped_fake_nswindow_focus.h", + "test/scoped_fake_nswindow_focus.mm", + "test/scoped_fake_nswindow_fullscreen.h", + "test/scoped_fake_nswindow_fullscreen.mm", + "test/test_clipboard.cc", + "test/test_clipboard.h", + "test/windowed_nsnotification_observer.h", + "test/windowed_nsnotification_observer.mm", + ] + } + public_deps = [ ":base", ] @@ -655,10 +669,14 @@ test("ui_base_unittests") { "resource/resource_bundle_unittest.cc", "template_expressions_unittest.cc", "test/run_all_unittests.cc", - "test/scoped_fake_nswindow_fullscreen_unittest.mm", - "test/test_clipboard_unittest.cc", "user_activity/user_activity_detector_unittest.cc", ] + if (!is_ios) { + sources += [ + "test/scoped_fake_nswindow_fullscreen_unittest.mm", + "test/test_clipboard_unittest.cc", + ] + } data = [] data_deps = [] diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn index 32fc674..86ecb7e 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn @@ -52,18 +52,9 @@ component("gfx") { "animation/throb_animation.h", "animation/tween.cc", "animation/tween.h", - "blit.cc", - "blit.h", "break_list.h", "buffer_format_util.cc", "buffer_format_util.h", - "canvas.cc", - "canvas.h", - "canvas_notimplemented.cc", - "canvas_paint_mac.h", - "canvas_paint_mac.mm", - "canvas_skia.cc", - "canvas_skia_paint.h", "codec/jpeg_codec.cc", "codec/jpeg_codec.h", "codec/png_codec.cc", @@ -107,14 +98,10 @@ component("gfx") { "generic_shared_memory_id.h", "gfx_paths.cc", "gfx_paths.h", - "gpu_memory_buffer.cc", - "gpu_memory_buffer.h", "hud_font.cc", "hud_font.h", "icon_util.cc", "icon_util.h", - "image/canvas_image_source.cc", - "image/canvas_image_source.h", "image/image.cc", "image/image.h", "image/image_family.cc", @@ -125,8 +112,6 @@ component("gfx") { "image/image_png_rep.h", "image/image_skia.cc", "image/image_skia.h", - "image/image_skia_operations.cc", - "image/image_skia_operations.h", "image/image_skia_rep.cc", "image/image_skia_rep.h", "image/image_skia_source.h", @@ -149,8 +134,6 @@ component("gfx") { "native_widget_types.h", "nine_image_painter.cc", "nine_image_painter.h", - "paint_throbber.cc", - "paint_throbber.h", "path.cc", "path.h", "path_win.cc", @@ -236,6 +219,27 @@ component("gfx") { "win/window_impl.cc", "win/window_impl.h", ] + if (!is_ios) { + sources += [ + "blit.cc", + "blit.h", + "canvas.cc", + "canvas.h", + "canvas_notimplemented.cc", + "canvas_paint_mac.h", + "canvas_paint_mac.mm", + "canvas_skia.cc", + "canvas_skia_paint.h", + "gpu_memory_buffer.cc", + "gpu_memory_buffer.h", + "image/canvas_image_source.cc", + "image/canvas_image_source.h", + "image/image_skia_operations.cc", + "image/image_skia_operations.h", + "paint_throbber.cc", + "paint_throbber.h", + ] + } configs += [ "//build/config:precompiled_headers", @@ -270,14 +274,19 @@ component("gfx") { sources += [ "harfbuzz_font_skia.cc", "harfbuzz_font_skia.h", - "render_text.cc", - "render_text.h", "render_text_harfbuzz.cc", "render_text_harfbuzz.h", "render_text_mac.cc", "render_text_mac.h", "text_utils_skia.cc", ] + + if (!is_ios) { + sources += [ + "render_text.cc", + "render_text.h", + ] + } } else { # We don't support RenderText on these platforms. } @@ -332,7 +341,7 @@ component("gfx") { "android", "jnigraphics", ] - } else { + } else if (!is_ios) { sources -= [ "canvas_notimplemented.cc" ] } diff --git a/ui/gfx/color_profile.cc b/ui/gfx/color_profile.cc index c135e30..4fb4c9f 100644 --- a/ui/gfx/color_profile.cc +++ b/ui/gfx/color_profile.cc @@ -6,7 +6,7 @@ namespace gfx { -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) void ReadColorProfile(std::vector<char>* profile); #else void ReadColorProfile(std::vector<char>* profile) { } diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp index 98575ae..dfbf19d 100644 --- a/ui/gfx/gfx.gyp +++ b/ui/gfx/gfx.gyp @@ -124,6 +124,7 @@ 'animation/throb_animation.h', 'animation/tween.cc', 'animation/tween.h', + 'break_list.h', 'blit.cc', 'blit.h', 'break_list.h', @@ -178,8 +179,7 @@ 'gfx_export.h', 'gfx_paths.cc', 'gfx_paths.h', - 'gpu_memory_buffer.cc', - 'gpu_memory_buffer.h', + 'harfbuzz_font_skia.cc', 'harfbuzz_font_skia.h', 'hud_font.cc', @@ -329,9 +329,22 @@ 'xcode_settings': {'OTHER_LDFLAGS': ['-ObjC']}, }, 'sources!': [ + 'blit.cc', + 'blit.h', + 'canvas.cc', + 'canvas.h', + 'canvas_notimplemented.cc', + 'canvas_paint_mac.h', + 'canvas_paint_mac.mm', + 'canvas_skia.cc', + 'canvas_skia_paint.h', 'codec/jpeg_codec.cc', ], }, { + 'sources':[ + 'gpu_memory_buffer.cc', + 'gpu_memory_buffer.h', + ], 'dependencies': [ '<(libjpeg_gyp_path):libjpeg', ], |