mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
268 lines
7.0 KiB
Plaintext
268 lines
7.0 KiB
Plaintext
# Copyright 2014 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/features.gni")
|
|
import("//build/config/jumbo.gni")
|
|
import("//build/config/ui.gni")
|
|
import("//components/vector_icons/vector_icons.gni")
|
|
import("//testing/test.gni")
|
|
import("//ui/base/ui_features.gni")
|
|
|
|
aggregate_vector_icons("message_center_vector_icons") {
|
|
icon_directory = "vector_icons"
|
|
|
|
icons = [
|
|
"notification_close_button.icon",
|
|
"notification_expand_less.icon",
|
|
"notification_expand_more.icon",
|
|
"notification_inline_reply.icon",
|
|
"notification_settings_button.icon",
|
|
"product.icon",
|
|
]
|
|
}
|
|
|
|
# TODO(msw|mukai|dewittj): Move ash-specific files: crbug.com/585175
|
|
jumbo_component("message_center") {
|
|
deps = [
|
|
"//base",
|
|
"//ui/base",
|
|
"//ui/strings",
|
|
"//url",
|
|
]
|
|
|
|
public_deps = [
|
|
"//ui/message_center/public/cpp",
|
|
]
|
|
|
|
defines = [ "MESSAGE_CENTER_IMPLEMENTATION" ]
|
|
|
|
if (enable_message_center) {
|
|
deps += [
|
|
":message_center_vector_icons",
|
|
"//base:i18n",
|
|
"//base/third_party/dynamic_annotations",
|
|
"//components/url_formatter",
|
|
"//skia",
|
|
"//ui/accessibility",
|
|
"//ui/display",
|
|
"//ui/events",
|
|
"//ui/events:gesture_detection",
|
|
"//ui/gfx",
|
|
"//ui/gfx/geometry",
|
|
"//ui/native_theme",
|
|
"//ui/resources",
|
|
]
|
|
|
|
configs += [
|
|
"//build/config:precompiled_headers",
|
|
|
|
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
|
|
"//build/config/compiler:no_size_t_to_int_warning",
|
|
]
|
|
sources = [
|
|
"cocoa/notification_controller.h",
|
|
"cocoa/notification_controller.mm",
|
|
"cocoa/opaque_views.h",
|
|
"cocoa/opaque_views.mm",
|
|
"cocoa/popup_collection.h",
|
|
"cocoa/popup_collection.mm",
|
|
"cocoa/popup_controller.h",
|
|
"cocoa/popup_controller.mm",
|
|
"message_center.cc",
|
|
"message_center.h",
|
|
"message_center_export.h",
|
|
"message_center_impl.cc",
|
|
"message_center_impl.h",
|
|
"message_center_observer.h",
|
|
"message_center_stats_collector.cc",
|
|
"message_center_stats_collector.h",
|
|
"message_center_style.cc",
|
|
"message_center_style.h",
|
|
"message_center_types.h",
|
|
"notification_blocker.cc",
|
|
"notification_blocker.h",
|
|
"notification_list.cc",
|
|
"notification_list.h",
|
|
"popup_timer.cc",
|
|
"popup_timer.h",
|
|
"popup_timers_controller.cc",
|
|
"popup_timers_controller.h",
|
|
"ui_controller.cc",
|
|
"ui_controller.h",
|
|
"ui_delegate.h",
|
|
]
|
|
|
|
sources += get_target_outputs(":message_center_vector_icons")
|
|
|
|
if (is_win) {
|
|
deps += [
|
|
"//ui/aura",
|
|
"//ui/wm/public",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
libs = [
|
|
"AppKit.framework",
|
|
"Foundation.framework",
|
|
]
|
|
}
|
|
|
|
# On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
|
|
# with message_center_unittests below.
|
|
if (toolkit_views && !is_mac) {
|
|
sources += [
|
|
"views/bounded_label.cc",
|
|
"views/bounded_label.h",
|
|
"views/desktop_popup_alignment_delegate.cc",
|
|
"views/desktop_popup_alignment_delegate.h",
|
|
"views/message_popup_collection.cc",
|
|
"views/message_popup_collection.h",
|
|
"views/message_view.cc",
|
|
"views/message_view.h",
|
|
"views/message_view_factory.cc",
|
|
"views/message_view_factory.h",
|
|
"views/notification_button.cc",
|
|
"views/notification_button.h",
|
|
"views/notification_control_buttons_view.cc",
|
|
"views/notification_control_buttons_view.h",
|
|
"views/notification_header_view.cc",
|
|
"views/notification_header_view.h",
|
|
"views/notification_view.cc",
|
|
"views/notification_view.h",
|
|
"views/notification_view_md.cc",
|
|
"views/notification_view_md.h",
|
|
"views/padded_button.cc",
|
|
"views/padded_button.h",
|
|
"views/popup_alignment_delegate.cc",
|
|
"views/popup_alignment_delegate.h",
|
|
"views/proportional_image_view.cc",
|
|
"views/proportional_image_view.h",
|
|
"views/slide_out_controller.cc",
|
|
"views/slide_out_controller.h",
|
|
"views/toast_contents_view.cc",
|
|
"views/toast_contents_view.h",
|
|
]
|
|
if (!is_chromeos) {
|
|
sources += [
|
|
"views/message_view_context_menu_controller.cc",
|
|
"views/message_view_context_menu_controller.h",
|
|
"views/notification_menu_model.cc",
|
|
"views/notification_menu_model.h",
|
|
]
|
|
}
|
|
deps += [
|
|
"//ui/compositor",
|
|
"//ui/events",
|
|
"//ui/views",
|
|
]
|
|
}
|
|
} else {
|
|
# Notification service disabled.
|
|
sources = [
|
|
"dummy_message_center.cc",
|
|
]
|
|
}
|
|
}
|
|
|
|
if (enable_message_center) {
|
|
static_library("test_support") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"fake_message_center.cc",
|
|
"fake_message_center.h",
|
|
"fake_ui_delegate.cc",
|
|
"fake_ui_delegate.h",
|
|
]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//skia",
|
|
"//ui/gfx",
|
|
"//ui/gfx/geometry",
|
|
]
|
|
|
|
public_deps = [
|
|
":message_center",
|
|
"//ui/message_center/public/cpp",
|
|
]
|
|
}
|
|
|
|
test("message_center_unittests") {
|
|
sources = [
|
|
"cocoa/notification_controller_unittest.mm",
|
|
"cocoa/popup_collection_unittest.mm",
|
|
"cocoa/popup_controller_unittest.mm",
|
|
"message_center_impl_unittest.cc",
|
|
"notification_list_unittest.cc",
|
|
"public/cpp/notification_delegate_unittest.cc",
|
|
"test/run_all_unittests.cc",
|
|
"ui_controller_unittest.cc",
|
|
]
|
|
|
|
deps = [
|
|
":message_center",
|
|
":test_support",
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//mojo/edk",
|
|
"//skia",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//ui/base",
|
|
"//ui/base:test_support",
|
|
"//ui/events",
|
|
"//ui/events:test_support",
|
|
"//ui/gfx",
|
|
"//ui/gfx:test_support",
|
|
"//ui/gfx/geometry",
|
|
"//ui/gl",
|
|
"//ui/gl:test_support",
|
|
"//ui/message_center/public/cpp",
|
|
"//ui/resources",
|
|
"//ui/resources:ui_test_pak",
|
|
"//url",
|
|
]
|
|
|
|
data_deps = [
|
|
"//third_party/mesa:osmesa",
|
|
"//ui/resources:ui_test_pak_data",
|
|
]
|
|
|
|
if (is_chromeos) {
|
|
sources += [ "public/mojo/struct_traits_unittest.cc" ]
|
|
deps += [
|
|
"//mojo/edk",
|
|
"//ui/message_center/public/mojo:test_interfaces",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
deps += [ "//ui/gfx:test_support" ]
|
|
}
|
|
|
|
if (toolkit_views && !is_mac) {
|
|
sources += [
|
|
"views/bounded_label_unittest.cc",
|
|
"views/message_popup_collection_unittest.cc",
|
|
"views/notification_view_md_unittest.cc",
|
|
"views/notification_view_unittest.cc",
|
|
]
|
|
if (!is_chromeos) {
|
|
sources += [ "views/notification_menu_model_unittest.cc" ]
|
|
}
|
|
deps += [
|
|
# Compositor is needed by message_center_view_unittest.cc and for the
|
|
# fonts used by bounded_label_unittest.cc.
|
|
"//ui/compositor",
|
|
"//ui/display",
|
|
"//ui/views",
|
|
"//ui/views:test_support",
|
|
]
|
|
}
|
|
}
|
|
}
|