summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-22 03:11:55 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-22 03:11:55 +0000
commitee01309caee5c8ec26f7338f866a86f068d6458a (patch)
tree9f38ce8834d0a9b8055c8455c37589ac066bea0f /ui
parentda668570e23f72e27b8b5556af6627aa14634431 (diff)
downloadchromium_src-ee01309caee5c8ec26f7338f866a86f068d6458a.zip
chromium_src-ee01309caee5c8ec26f7338f866a86f068d6458a.tar.gz
chromium_src-ee01309caee5c8ec26f7338f866a86f068d6458a.tar.bz2
Break cycles between views, content and webview.
When running gyp_chromium with the following diff: diff --git a/build/gyp_chromium b/build/gyp_chromium index 63e8671..ca9b6a4 100755 --- a/build/gyp_chromium +++ b/build/gyp_chromium @@ -509,8 +509,6 @@ if __name__ == '__main__': # option. http://crbug.com/35878. # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 # list. - if sys.platform not in ('darwin',): - args.append('--no-circular-check') These cycles are found: gyp: Cycles in .gyp file dependency graph detected: Cycle: content/content_shell_and_tests.gyp -> ui/views/controls/webview/webview.gyp -> ui/views/views.gyp -> content/content_shell_and_tests.gyp Cycle: ui/views/controls/webview/webview.gyp -> ui/views/views.gyp -> content/content_shell_and_tests.gyp -> ui/views/controls/webview/webview.gyp Cycle: ui/views/views.gyp -> content/content_shell_and_tests.gyp -> ui/views/controls/webview/webview.gyp -> ui/views/views.gyp Cycle: ui/views/views.gyp -> content/content_shell_and_tests.gyp -> ui/views/views.gyp Cycle: ui/views/controls/webview/webview.gyp -> ui/views/views.gyp -> ui/views/controls/webview/webview.gyp Cycle: ui/views/views.gyp -> ui/views/controls/webview/webview.gyp -> ui/views/views.gyp Cycle: content/content_shell_and_tests.gyp -> ui/views/views.gyp -> content/content_shell_and_tests.gyp By moving '*examples*' targets from views.gyp to examples.gyp we break most of these cycles. Then it remains the cycle: Cycle: content/content_shell_and_tests.gyp -> ui/views/controls/webview/webview.gyp -> content/content_shell_and_tests.gyp To fix that we introduced a webview_tests.gyp to which we moved the include of content_shell_and_tests.gyp from webview.gyp, and thus breaking that cycle and fixing all the circlar dependencies found above. BUG=331669,35878 TEST=run gyp_chromium with the above diff, gyp should not throw any cycles output. R=ben@chromium.org, harrym@chromium.org, tapted@chromium.org Review URL: https://codereview.chromium.org/201093002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/controls/webview/webview_tests.gyp38
-rw-r--r--ui/views/examples/examples.gyp230
-rw-r--r--ui/views/views.gyp247
3 files changed, 268 insertions, 247 deletions
diff --git a/ui/views/controls/webview/webview_tests.gyp b/ui/views/controls/webview/webview_tests.gyp
new file mode 100644
index 0000000..0adc5c2b
--- /dev/null
+++ b/ui/views/controls/webview/webview_tests.gyp
@@ -0,0 +1,38 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'webview_test_support',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../../../base/base.gyp:base',
+ '../../../../content/content.gyp:content',
+ '../../../../content/content_shell_and_tests.gyp:test_support_content',
+ '../../../../ipc/ipc.gyp:test_support_ipc',
+ '../../../../skia/skia.gyp:skia',
+ '../../../../testing/gtest.gyp:gtest',
+ '../../../aura/aura.gyp:aura',
+ '../../../base/ui_base.gyp:ui_base',
+ '../../../events/events.gyp:events',
+ '../../../gfx/gfx.gyp:gfx',
+ '../../../gfx/gfx.gyp:gfx_geometry',
+ '../../views.gyp:views',
+ '../../views.gyp:views_test_support',
+ 'webview.gyp:webview',
+ ],
+ 'include_dirs': [
+ '../../../..',
+ ],
+ 'sources': [
+ '../../test/webview_test_helper.cc',
+ '../../test/webview_test_helper.h',
+ ],
+ },
+ ],
+}
diff --git a/ui/views/examples/examples.gyp b/ui/views/examples/examples.gyp
new file mode 100644
index 0000000..100d8b9
--- /dev/null
+++ b/ui/views/examples/examples.gyp
@@ -0,0 +1,230 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'views_examples_lib',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../../../base/base.gyp:base',
+ '../../../skia/skia.gyp:skia',
+ '../../../third_party/icu/icu.gyp:icui18n',
+ '../../../third_party/icu/icu.gyp:icuuc',
+ '../../aura/aura.gyp:aura',
+ '../../base/ui_base.gyp:ui_base',
+ '../../events/events.gyp:events',
+ '../../gfx/gfx.gyp:gfx',
+ '../../gfx/gfx.gyp:gfx_geometry',
+ '../../resources/ui_resources.gyp:ui_resources',
+ '../../resources/ui_resources.gyp:ui_test_pak',
+ '../views.gyp:views',
+ ],
+ 'include_dirs': [
+ '../../..',
+ ],
+ 'defines': [
+ 'VIEWS_EXAMPLES_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'bubble_example.cc',
+ 'bubble_example.h',
+ 'button_example.cc',
+ 'button_example.h',
+ 'checkbox_example.cc',
+ 'checkbox_example.h',
+ 'combobox_example.cc',
+ 'combobox_example.h',
+ 'double_split_view_example.cc',
+ 'double_split_view_example.h',
+ 'example_base.cc',
+ 'example_base.h',
+ 'example_combobox_model.cc',
+ 'example_combobox_model.h',
+ 'examples_window.cc',
+ 'examples_window.h',
+ 'label_example.cc',
+ 'label_example.h',
+ 'link_example.cc',
+ 'link_example.h',
+ 'message_box_example.cc',
+ 'message_box_example.h',
+ 'menu_example.cc',
+ 'menu_example.h',
+ 'multiline_example.cc',
+ 'multiline_example.h',
+ 'progress_bar_example.cc',
+ 'progress_bar_example.h',
+ 'radio_button_example.cc',
+ 'radio_button_example.h',
+ 'scroll_view_example.cc',
+ 'scroll_view_example.h',
+ 'single_split_view_example.cc',
+ 'single_split_view_example.h',
+ 'slider_example.cc',
+ 'slider_example.h',
+ 'tabbed_pane_example.cc',
+ 'tabbed_pane_example.h',
+ 'table_example.cc',
+ 'table_example.h',
+ 'text_example.cc',
+ 'text_example.h',
+ 'textfield_example.cc',
+ 'textfield_example.h',
+ 'throbber_example.cc',
+ 'throbber_example.h',
+ 'tree_view_example.cc',
+ 'tree_view_example.h',
+ 'views_examples_export.h',
+ 'widget_example.cc',
+ 'widget_example.h',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'include_dirs': [
+ '../../../third_party/wtl/include',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
+ }],
+ ],
+ }, # target_name: views_examples_lib
+ {
+ 'target_name': 'views_examples_exe',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../../base/base.gyp:base',
+ '../../../base/base.gyp:base_i18n',
+ '../../aura/aura.gyp:aura',
+ '../../base/ui_base.gyp:ui_base',
+ '../../compositor/compositor.gyp:compositor',
+ '../../compositor/compositor.gyp:compositor_test_support',
+ '../../gfx/gfx.gyp:gfx',
+ '../../resources/ui_resources.gyp:ui_test_pak',
+ '../views.gyp:views',
+ '../views.gyp:views_test_support',
+ 'views_examples_lib',
+ ],
+ 'sources': [
+ 'examples_main.cc',
+ ],
+ }, # target_name: views_examples_exe
+ {
+ 'target_name': 'views_examples_with_content_lib',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../../../base/base.gyp:base',
+ '../../../base/base.gyp:base_i18n',
+ '../../../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',
+ '../../aura/aura.gyp:aura',
+ '../../base/ui_base.gyp:ui_base',
+ '../../events/events.gyp:events',
+ '../../gfx/gfx.gyp:gfx',
+ '../../gfx/gfx.gyp:gfx_geometry',
+ '../../resources/ui_resources.gyp:ui_resources',
+ '../../resources/ui_resources.gyp:ui_test_pak',
+ '../controls/webview/webview.gyp:webview',
+ '../views.gyp:views',
+ 'views_examples_lib',
+ ],
+ 'include_dirs': [
+ '../../..',
+ ],
+ 'defines': [
+ 'VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'examples_window_with_content.cc',
+ 'examples_window_with_content.h',
+ 'views_examples_with_content_export.h',
+ 'webview_example.cc',
+ 'webview_example.h',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'include_dirs': [
+ '../../../third_party/wtl/include',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
+ }],
+ ],
+ }, # target_name: views_examples_with_content_lib
+ {
+ 'target_name': 'views_examples_with_content_exe',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../../base/base.gyp:base',
+ '../../../base/base.gyp:base_i18n',
+ '../../../content/content.gyp:content',
+ '../../../content/content_shell_and_tests.gyp:content_shell_lib',
+ '../../../content/content_shell_and_tests.gyp:test_support_content',
+ '../../../skia/skia.gyp:skia',
+ '../../../third_party/icu/icu.gyp:icui18n',
+ '../../../third_party/icu/icu.gyp:icuuc',
+ '../../aura/aura.gyp:aura',
+ '../../base/ui_base.gyp:ui_base',
+ '../../compositor/compositor.gyp:compositor',
+ '../../events/events.gyp:events',
+ '../../gfx/gfx.gyp:gfx',
+ '../../gfx/gfx.gyp:gfx_geometry',
+ '../../resources/ui_resources.gyp:ui_resources',
+ '../../resources/ui_resources.gyp:ui_test_pak',
+ '../../wm/wm.gyp:wm_test_support',
+ '../views.gyp:views',
+ '../views.gyp:views_test_support',
+ 'views_examples_with_content_lib',
+ ],
+ 'include_dirs': [
+ '../../..',
+ ],
+ 'sources': [
+ '../../../content/app/startup_helper_win.cc',
+ 'content_client/examples_browser_main_parts.cc',
+ 'content_client/examples_browser_main_parts.h',
+ 'content_client/examples_content_browser_client.cc',
+ 'content_client/examples_content_browser_client.h',
+ 'content_client/examples_main_delegate.cc',
+ 'content_client/examples_main_delegate.h',
+ 'content_client/examples_main.cc',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'link_settings': {
+ 'libraries': [
+ '-limm32.lib',
+ '-loleacc.lib',
+ ]
+ },
+ 'msvs_settings': {
+ 'VCManifestTool': {
+ 'AdditionalManifestFiles': [
+ 'views_examples.exe.manifest',
+ ],
+ },
+ 'VCLinkerTool': {
+ 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
+ },
+ },
+ 'dependencies': [
+ '../../../sandbox/sandbox.gyp:sandbox',
+ ],
+ }],
+ ['OS=="win"', {
+ 'sources/': [
+ # This is needed because the aura rule strips it from the default
+ # sources list.
+ ['include', '^../../../content/app/startup_helper_win.cc'],
+ ],
+ }],
+ ],
+ }, # target_name: views_examples_with_content_exe
+ ],
+}
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 9b010e7..a099de7 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -551,33 +551,6 @@
],
}, # target_name: views_test_support
{
- 'target_name': 'views_with_content_test_support',
- 'type': 'static_library',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../content/content.gyp:content',
- '../../content/content_shell_and_tests.gyp:test_support_content',
- '../../ipc/ipc.gyp:test_support_ipc',
- '../../skia/skia.gyp:skia',
- '../../testing/gtest.gyp:gtest',
- '../aura/aura.gyp:aura',
- '../base/ui_base.gyp:ui_base',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx',
- '../gfx/gfx.gyp:gfx_geometry',
- 'controls/webview/webview.gyp:webview',
- 'views_test_support',
- 'views',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'test/webview_test_helper.cc',
- 'test/webview_test_helper.h',
- ],
- }, # target_name: views_with_content_test_support
- {
'target_name': 'views_unittests',
'type': 'executable',
'dependencies': [
@@ -718,225 +691,5 @@
}],
],
}, # target_name: views_unittests
- {
- 'target_name': 'views_examples_lib',
- 'type': '<(component)',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../skia/skia.gyp:skia',
- '../../third_party/icu/icu.gyp:icui18n',
- '../../third_party/icu/icu.gyp:icuuc',
- '../aura/aura.gyp:aura',
- '../base/ui_base.gyp:ui_base',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx',
- '../gfx/gfx.gyp:gfx_geometry',
- '../resources/ui_resources.gyp:ui_resources',
- '../resources/ui_resources.gyp:ui_test_pak',
- 'views',
- ],
- 'include_dirs': [
- '..',
- ],
- 'defines': [
- 'VIEWS_EXAMPLES_IMPLEMENTATION',
- ],
- 'sources': [
- 'examples/bubble_example.cc',
- 'examples/bubble_example.h',
- 'examples/button_example.cc',
- 'examples/button_example.h',
- 'examples/checkbox_example.cc',
- 'examples/checkbox_example.h',
- 'examples/combobox_example.cc',
- 'examples/combobox_example.h',
- 'examples/double_split_view_example.cc',
- 'examples/double_split_view_example.h',
- 'examples/example_base.cc',
- 'examples/example_base.h',
- 'examples/example_combobox_model.cc',
- 'examples/example_combobox_model.h',
- 'examples/examples_window.cc',
- 'examples/examples_window.h',
- 'examples/label_example.cc',
- 'examples/label_example.h',
- 'examples/link_example.cc',
- 'examples/link_example.h',
- 'examples/message_box_example.cc',
- 'examples/message_box_example.h',
- 'examples/menu_example.cc',
- 'examples/menu_example.h',
- 'examples/multiline_example.cc',
- 'examples/multiline_example.h',
- 'examples/progress_bar_example.cc',
- 'examples/progress_bar_example.h',
- 'examples/radio_button_example.cc',
- 'examples/radio_button_example.h',
- 'examples/scroll_view_example.cc',
- 'examples/scroll_view_example.h',
- 'examples/single_split_view_example.cc',
- 'examples/single_split_view_example.h',
- 'examples/slider_example.cc',
- 'examples/slider_example.h',
- 'examples/tabbed_pane_example.cc',
- 'examples/tabbed_pane_example.h',
- 'examples/table_example.cc',
- 'examples/table_example.h',
- 'examples/text_example.cc',
- 'examples/text_example.h',
- 'examples/textfield_example.cc',
- 'examples/textfield_example.h',
- 'examples/throbber_example.cc',
- 'examples/throbber_example.h',
- 'examples/tree_view_example.cc',
- 'examples/tree_view_example.h',
- 'examples/views_examples_export.h',
- 'examples/widget_example.cc',
- 'examples/widget_example.h',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'include_dirs': [
- '../third_party/wtl/include',
- ],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [ 4267, ],
- }],
- ],
- }, # target_name: views_examples_lib
- {
- 'target_name': 'views_examples_exe',
- 'type': 'executable',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../base/base.gyp:base_i18n',
- '../aura/aura.gyp:aura',
- '../base/ui_base.gyp:ui_base',
- '../compositor/compositor.gyp:compositor',
- '../compositor/compositor.gyp:compositor_test_support',
- '../gfx/gfx.gyp:gfx',
- '../resources/ui_resources.gyp:ui_test_pak',
- 'views',
- 'views_examples_lib',
- 'views_test_support',
- ],
- 'sources': [
- 'examples/examples_main.cc',
- ],
- }, # target_name: views_examples_exe
- {
- 'target_name': 'views_examples_with_content_lib',
- 'type': '<(component)',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../base/base.gyp:base_i18n',
- '../../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',
- '../aura/aura.gyp:aura',
- '../base/ui_base.gyp:ui_base',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx',
- '../gfx/gfx.gyp:gfx_geometry',
- '../resources/ui_resources.gyp:ui_resources',
- '../resources/ui_resources.gyp:ui_test_pak',
- 'controls/webview/webview.gyp:webview',
- 'views',
- 'views_examples_lib',
- ],
- 'include_dirs': [
- '..',
- ],
- 'defines': [
- 'VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION',
- ],
- 'sources': [
- 'examples/examples_window_with_content.cc',
- 'examples/examples_window_with_content.h',
- 'examples/views_examples_with_content_export.h',
- 'examples/webview_example.cc',
- 'examples/webview_example.h',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'include_dirs': [
- '../third_party/wtl/include',
- ],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [ 4267, ],
- }],
- ],
- }, # target_name: views_examples_with_content_lib
- {
- 'target_name': 'views_examples_with_content_exe',
- 'type': 'executable',
- 'dependencies': [
- '../../base/base.gyp:base',
- '../../base/base.gyp:base_i18n',
- '../../content/content.gyp:content',
- '../../content/content_shell_and_tests.gyp:content_shell_lib',
- '../../content/content_shell_and_tests.gyp:test_support_content',
- '../../skia/skia.gyp:skia',
- '../../third_party/icu/icu.gyp:icui18n',
- '../../third_party/icu/icu.gyp:icuuc',
- '../aura/aura.gyp:aura',
- '../base/ui_base.gyp:ui_base',
- '../compositor/compositor.gyp:compositor',
- '../events/events.gyp:events',
- '../gfx/gfx.gyp:gfx',
- '../gfx/gfx.gyp:gfx_geometry',
- '../resources/ui_resources.gyp:ui_resources',
- '../resources/ui_resources.gyp:ui_test_pak',
- '../wm/wm.gyp:wm_test_support',
- 'views',
- 'views_examples_with_content_lib',
- 'views_test_support'
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [
- '../../content/app/startup_helper_win.cc',
- 'examples/content_client/examples_browser_main_parts.cc',
- 'examples/content_client/examples_browser_main_parts.h',
- 'examples/content_client/examples_content_browser_client.cc',
- 'examples/content_client/examples_content_browser_client.h',
- 'examples/content_client/examples_main_delegate.cc',
- 'examples/content_client/examples_main_delegate.h',
- 'examples/content_client/examples_main.cc',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'link_settings': {
- 'libraries': [
- '-limm32.lib',
- '-loleacc.lib',
- ]
- },
- 'msvs_settings': {
- 'VCManifestTool': {
- 'AdditionalManifestFiles': [
- 'examples\\views_examples.exe.manifest',
- ],
- },
- 'VCLinkerTool': {
- 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
- },
- },
- 'dependencies': [
- '../../sandbox/sandbox.gyp:sandbox',
- ],
- }],
- ['OS=="win"', {
- 'sources/': [
- # This is needed because the aura rule strips it from the default
- # sources list.
- ['include', '^../../content/app/startup_helper_win.cc'],
- ],
- }],
- ],
- }, # target_name: views_examples_with_content_exe
],
}