Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Backport] Generated header files apparently necessitate hard_dependency
Browse files Browse the repository at this point in the history
BUG=509277,508897
[email protected],[email protected]

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

Cr-Commit-Position: refs/heads/master@{#338690}

[Crosswalk notes: bug 508897 is surfacing at least on Tizen builds]
  • Loading branch information
estade authored and Raphael Kubo da Costa committed Oct 8, 2015
1 parent 1c669b9 commit e23bfe2
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 36 deletions.
1 change: 1 addition & 0 deletions chrome/browser/ui/views/profiles/profile_chooser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "ui/gfx/path.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/text_elider.h"
#include "ui/gfx/vector_icons_public.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/button/blue_button.h"
#include "ui/views/controls/button/image_button.h"
Expand Down
3 changes: 3 additions & 0 deletions chrome/chrome_browser_ui.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2921,6 +2921,9 @@
}],
['OS!="mac"', {
'sources': [ '<@(chrome_browser_ui_views_non_mac_sources)' ],
'dependencies': [
'../ui/gfx/gfx.gyp:gfx_vector_icons',
],
'conditions': [
['enable_extensions==1', {
'sources': [ '<@(chrome_browser_ui_views_extensions_non_mac_sources)' ],
Expand Down
84 changes: 49 additions & 35 deletions ui/gfx/gfx.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -408,41 +408,6 @@
'text_utils_skia.cc',
],
}, { # desktop platforms
'variables': {
'vector_icons_cc_file': '<(INTERMEDIATE_DIR)/ui/gfx/vector_icons.cc',
'vector_icons_public_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/vector_icons_public.h',
},
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
],
'sources': [
'<(vector_icons_cc_file)',
'<(vector_icons_public_h_file)',

'paint_vector_icon.cc',
'paint_vector_icon.h',
'vector_icons.h',
],
'actions': [
{
# GN version: //ui/gfx:aggregate_vector_icons
'action_name': 'aggregate_vector_icons',
'inputs': [
'vector_icons/',
],
'outputs': [
'<(vector_icons_cc_file)',
'<(vector_icons_public_h_file)',
],
'action': [ 'python',
'vector_icons/aggregate_vector_icons.py',
'--working_directory=vector_icons/',
'--output_cc=<(vector_icons_cc_file)',
'--output_h=<(vector_icons_public_h_file)',
],
'message': 'Aggregating vector resources.',
},
],
}],
['use_x11==1', {
'dependencies': [
Expand Down Expand Up @@ -472,6 +437,55 @@
}],
],
},
# Separate from gfx to limit the impact of the hard_dependency.
{
'target_name': 'gfx_vector_icons',
'type': '<(component)',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/skia/skia.gyp:skia',
'gfx',
'gfx_geometry',
],
'defines': [
'GFX_IMPLEMENTATION',
],
'sources': [
'paint_vector_icon.cc',
'paint_vector_icon.h',
'vector_icons.h',
],
'variables': {
'vector_icons_cc_file': '<(INTERMEDIATE_DIR)/ui/gfx/vector_icons.cc',
'vector_icons_public_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/vector_icons_public.h',
},
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
],
'actions': [
{
# GN version: //ui/gfx:aggregate_vector_icons
'action_name': 'aggregate_vector_icons',
'inputs': [
'vector_icons/',
],
'outputs': [
'<(vector_icons_cc_file)',
'<(vector_icons_public_h_file)',
],
'action': [ 'python',
'vector_icons/aggregate_vector_icons.py',
'--working_directory=vector_icons/',
'--output_cc=<(vector_icons_cc_file)',
'--output_h=<(vector_icons_public_h_file)',
],
'message': 'Aggregating vector resources.',
'process_outputs_as_sources': 1,
},
],
# Export a hard dependency because of generated header files.
'hard_dependency': 1,
},
{
'target_name': 'gfx_test_support',
'type': 'static_library',
Expand Down
1 change: 1 addition & 0 deletions ui/views/controls/image_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
#include "ui/views/painter.h"

namespace views {
Expand Down
2 changes: 1 addition & 1 deletion ui/views/controls/image_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/vector_icons_public.h"
#include "ui/views/view.h"

namespace gfx {
class Canvas;
enum class VectorIconId;
}

namespace views {
Expand Down
1 change: 1 addition & 0 deletions ui/views/views.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@
'../events/platform/events_platform.gyp:events_platform',
'../gfx/gfx.gyp:gfx',
'../gfx/gfx.gyp:gfx_geometry',
'../gfx/gfx.gyp:gfx_vector_icons',
'../native_theme/native_theme.gyp:native_theme',
'../resources/ui_resources.gyp:ui_resources',
'../strings/ui_strings.gyp:ui_strings',
Expand Down

0 comments on commit e23bfe2

Please sign in to comment.