Skip to content

Commit

Permalink
Restructure the events target into two components:
Browse files Browse the repository at this point in the history
- events_base (built by most people) - defining some basic utilities.
- events (built by users of aura/views) - the ui::Event type & friends.

Prior to this there was one target, and platforms that did not want ui::Event would exclude those files explicitly, making it hard to build those files on those platforms without breaking other components.

R=sadrul@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/57433011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233347 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
ben@chromium.org committed Nov 6, 2013
1 parent 7fa2be9 commit 114efae
Show file tree
Hide file tree
Showing 34 changed files with 300 additions and 120 deletions.
2 changes: 1 addition & 1 deletion cc/cc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'<(DEPTH)/media/media.gyp:media',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink_minimal',
'<(DEPTH)/ui/events/events.gyp:events',
'<(DEPTH)/ui/events/events.gyp:events_base',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gl/gl.gyp:gl',
],
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@
'dependencies': [
'chrome_resources.gyp:chrome_strings',
'../base/base.gyp:base',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
],
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'../third_party/zlib/zlib.gyp:minizip',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/base/strings/ui_strings.gyp:ui_strings',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/message_center/message_center.gyp:message_center',
'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
Expand Down
17 changes: 9 additions & 8 deletions chrome/chrome_browser_ui.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
'../third_party/libxml/libxml.gyp:libxml',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/base/strings/ui_strings.gyp:ui_strings',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/message_center/message_center.gyp:message_center',
'../ui/native_theme/native_theme.gyp:native_theme',
Expand Down Expand Up @@ -2672,17 +2671,19 @@
'../third_party/libusb/libusb.gyp:libusb',
],
}],
['toolkit_views == 0', {
'sources!': [
'browser/ui/tabs/tab_strip_layout_type.h',
'browser/ui/tabs/tab_strip_layout_type_prefs.cc',
'browser/ui/tabs/tab_strip_layout_type_prefs.h',
],
}],
['toolkit_views == 1', {
'dependencies': [
'../ui/events/events.gyp:events',
],
'sources!': [
'browser/ui/profile_reset_bubble_stub.cc',
],
}, { # toolkit_views == 0
'sources!': [
'browser/ui/tabs/tab_strip_layout_type.h',
'browser/ui/tabs/tab_strip_layout_type_prefs.cc',
'browser/ui/tabs/tab_strip_layout_type_prefs.h',
],
}],
['OS=="linux"', {
'dependencies': [
Expand Down
5 changes: 1 addition & 4 deletions chrome/chrome_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@
'../net/net.gyp:net',
'../third_party/zlib/zlib.gyp:minizip',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'../url/url.gyp:url_lib',
Expand Down Expand Up @@ -739,7 +738,7 @@
'../crypto/crypto.gyp:crypto',
'../net/net.gyp:http_server',
'../net/net.gyp:net',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
],
Expand Down Expand Up @@ -841,7 +840,6 @@
'../net/net.gyp:http_server',
'../net/net.gyp:net',
'../testing/gtest.gyp:gtest',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
],
Expand All @@ -865,7 +863,6 @@
'../net/net.gyp:http_server',
'../net/net.gyp:net',
'../testing/gtest.gyp:gtest',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
],
Expand Down
3 changes: 0 additions & 3 deletions components/autofill.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
'../third_party/WebKit/public/blink.gyp:blink_minimal',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'../url/url.gyp:url_lib',
Expand Down Expand Up @@ -112,7 +111,6 @@
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libjingle/libjingle.gyp:libjingle',
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'../url/url.gyp:url_lib',
Expand Down Expand Up @@ -301,7 +299,6 @@
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libjingle/libjingle.gyp:libjingle',
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'../url/url.gyp:url_lib',
Expand Down
1 change: 0 additions & 1 deletion content/content_app.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../crypto/crypto.gyp:crypto',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
],
Expand Down
7 changes: 6 additions & 1 deletion content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'../third_party/re2/re2.gyp:re2',
'../third_party/zlib/google/zip.gyp:zip',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/snapshot/snapshot.gyp:snapshot',
'../ui/ui.gyp:ui',
Expand Down Expand Up @@ -1230,6 +1230,11 @@
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/grit/webui_resources_map.cc',
],
'conditions': [
['toolkit_views==1', {
'dependencies': [
'../ui/events/events.gyp:events',
],
}],
['OS!="win" and OS!="mac" and OS!="linux"', {
'sources': [
'browser/gamepad/gamepad_platform_data_fetcher.cc',
Expand Down
2 changes: 1 addition & 1 deletion content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'../net/net.gyp:net_resources',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink_test_runner.gyp:blink_test_runner',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gl/gl.gyp:gl',
'../ui/ui.gyp:ui',
Expand Down
2 changes: 1 addition & 1 deletion content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:keycode_converter',
'../ui/ui.gyp:ui',
Expand Down
2 changes: 1 addition & 1 deletion media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
'../gpu/gpu.gyp:command_buffer_common',
'../skia/skia.gyp:skia',
'../third_party/opus/opus.gyp:opus',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../url/url.gyp:url_lib',
'shared_memory_support',
Expand Down
2 changes: 0 additions & 2 deletions remoting/remoting.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,6 @@
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'../net/net.gyp:net',
Expand Down Expand Up @@ -2789,7 +2788,6 @@
'../ppapi/ppapi.gyp:ppapi_cpp',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/ui.gyp:ui',
'remoting_base',
Expand Down
2 changes: 1 addition & 1 deletion ui/app_list/app_list.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'../../skia/skia.gyp:skia',
'../base/strings/ui_strings.gyp:ui_strings',
'../compositor/compositor.gyp:compositor',
'../events/events.gyp:events',
'../gfx/gfx.gyp:gfx',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
Expand Down Expand Up @@ -133,6 +132,7 @@
'dependencies': [
'../../content/content.gyp:content',
'../../content/content.gyp:content_browser',
'../events/events.gyp:events',
'../views/controls/webview/webview.gyp:webview',
'../views/views.gyp:views',
],
Expand Down
8 changes: 3 additions & 5 deletions ui/aura/aura.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'../../skia/skia.gyp:skia',
'../compositor/compositor.gyp:compositor',
'../events/events.gyp:events',
'../events/events.gyp:events_base',
'../gfx/gfx.gyp:gfx',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
Expand Down Expand Up @@ -125,11 +126,6 @@
'input_state_lookup.cc',
],
}],
['use_ozone==1', {
'dependencies': [
'../ozone/ozone.gyp:ozone',
],
}],
],
},
{
Expand All @@ -140,6 +136,7 @@
'../../testing/gtest.gyp:gtest',
'../compositor/compositor.gyp:compositor_test_support',
'../events/events.gyp:events',
'../events/events.gyp:events_base',
'../gfx/gfx.gyp:gfx',
'../ui.gyp:ui',
'../ui_unittests.gyp:ui_test_support',
Expand Down Expand Up @@ -276,6 +273,7 @@
'../compositor/compositor.gyp:compositor_test_support',
'../compositor/compositor.gyp:compositor',
'../events/events.gyp:events',
'../events/events.gyp:events_base',
'../gfx/gfx.gyp:gfx',
'../gl/gl.gyp:gl',
'../ui.gyp:ui',
Expand Down
3 changes: 0 additions & 3 deletions ui/compositor/compositor.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
'<(DEPTH)/cc/cc.gyp:cc',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink_minimal',
'<(DEPTH)/ui/events/events.gyp:events',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gl/gl.gyp:gl',
],
Expand Down Expand Up @@ -80,7 +79,6 @@
'<(DEPTH)/cc/cc_tests.gyp:cc_test_support',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/WebKit/public/blink.gyp:blink_minimal',
'<(DEPTH)/ui/events/events.gyp:events',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui',
Expand Down Expand Up @@ -110,7 +108,6 @@
'<(DEPTH)/cc/cc_tests.gyp:cc_test_support',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/ui/events/events.gyp:events',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui',
Expand Down
14 changes: 7 additions & 7 deletions ui/events/event_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
#define UI_EVENTS_EVENTS_SWITCHES_H_

#include "base/compiler_specific.h"
#include "ui/events/events_export.h"
#include "ui/events/events_base_export.h"

namespace switches {

EVENTS_EXPORT extern const char kEnableScrollPrediction[];
EVENTS_EXPORT extern const char kTouchEvents[];
EVENTS_EXPORT extern const char kTouchEventsAuto[];
EVENTS_EXPORT extern const char kTouchEventsEnabled[];
EVENTS_EXPORT extern const char kTouchEventsDisabled[];
EVENTS_BASE_EXPORT extern const char kEnableScrollPrediction[];
EVENTS_BASE_EXPORT extern const char kTouchEvents[];
EVENTS_BASE_EXPORT extern const char kTouchEventsAuto[];
EVENTS_BASE_EXPORT extern const char kTouchEventsEnabled[];
EVENTS_BASE_EXPORT extern const char kTouchEventsDisabled[];

#if defined(OS_LINUX)
EVENTS_EXPORT extern const char kTouchDevices[];
EVENTS_BASE_EXPORT extern const char kTouchDevices[];
#endif

} // namespace switches
Expand Down
Loading

0 comments on commit 114efae

Please sign in to comment.