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

Commit e23bfe2

Browse files
estadeRaphael Kubo da Costa
estade
authored and
Raphael Kubo da Costa
committed
[Backport] Generated header files apparently necessitate hard_dependency
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]
1 parent 1c669b9 commit e23bfe2

File tree

6 files changed

+56
-36
lines changed

6 files changed

+56
-36
lines changed

chrome/browser/ui/views/profiles/profile_chooser_view.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "ui/gfx/path.h"
5151
#include "ui/gfx/skia_util.h"
5252
#include "ui/gfx/text_elider.h"
53+
#include "ui/gfx/vector_icons_public.h"
5354
#include "ui/native_theme/native_theme.h"
5455
#include "ui/views/controls/button/blue_button.h"
5556
#include "ui/views/controls/button/image_button.h"

chrome/chrome_browser_ui.gypi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,6 +2921,9 @@
29212921
}],
29222922
['OS!="mac"', {
29232923
'sources': [ '<@(chrome_browser_ui_views_non_mac_sources)' ],
2924+
'dependencies': [
2925+
'../ui/gfx/gfx.gyp:gfx_vector_icons',
2926+
],
29242927
'conditions': [
29252928
['enable_extensions==1', {
29262929
'sources': [ '<@(chrome_browser_ui_views_extensions_non_mac_sources)' ],

ui/gfx/gfx.gyp

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -408,41 +408,6 @@
408408
'text_utils_skia.cc',
409409
],
410410
}, { # desktop platforms
411-
'variables': {
412-
'vector_icons_cc_file': '<(INTERMEDIATE_DIR)/ui/gfx/vector_icons.cc',
413-
'vector_icons_public_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/vector_icons_public.h',
414-
},
415-
'include_dirs': [
416-
'<(SHARED_INTERMEDIATE_DIR)',
417-
],
418-
'sources': [
419-
'<(vector_icons_cc_file)',
420-
'<(vector_icons_public_h_file)',
421-
422-
'paint_vector_icon.cc',
423-
'paint_vector_icon.h',
424-
'vector_icons.h',
425-
],
426-
'actions': [
427-
{
428-
# GN version: //ui/gfx:aggregate_vector_icons
429-
'action_name': 'aggregate_vector_icons',
430-
'inputs': [
431-
'vector_icons/',
432-
],
433-
'outputs': [
434-
'<(vector_icons_cc_file)',
435-
'<(vector_icons_public_h_file)',
436-
],
437-
'action': [ 'python',
438-
'vector_icons/aggregate_vector_icons.py',
439-
'--working_directory=vector_icons/',
440-
'--output_cc=<(vector_icons_cc_file)',
441-
'--output_h=<(vector_icons_public_h_file)',
442-
],
443-
'message': 'Aggregating vector resources.',
444-
},
445-
],
446411
}],
447412
['use_x11==1', {
448413
'dependencies': [
@@ -472,6 +437,55 @@
472437
}],
473438
],
474439
},
440+
# Separate from gfx to limit the impact of the hard_dependency.
441+
{
442+
'target_name': 'gfx_vector_icons',
443+
'type': '<(component)',
444+
'dependencies': [
445+
'<(DEPTH)/base/base.gyp:base',
446+
'<(DEPTH)/skia/skia.gyp:skia',
447+
'gfx',
448+
'gfx_geometry',
449+
],
450+
'defines': [
451+
'GFX_IMPLEMENTATION',
452+
],
453+
'sources': [
454+
'paint_vector_icon.cc',
455+
'paint_vector_icon.h',
456+
'vector_icons.h',
457+
],
458+
'variables': {
459+
'vector_icons_cc_file': '<(INTERMEDIATE_DIR)/ui/gfx/vector_icons.cc',
460+
'vector_icons_public_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/vector_icons_public.h',
461+
},
462+
'include_dirs': [
463+
'<(SHARED_INTERMEDIATE_DIR)',
464+
],
465+
'actions': [
466+
{
467+
# GN version: //ui/gfx:aggregate_vector_icons
468+
'action_name': 'aggregate_vector_icons',
469+
'inputs': [
470+
'vector_icons/',
471+
],
472+
'outputs': [
473+
'<(vector_icons_cc_file)',
474+
'<(vector_icons_public_h_file)',
475+
],
476+
'action': [ 'python',
477+
'vector_icons/aggregate_vector_icons.py',
478+
'--working_directory=vector_icons/',
479+
'--output_cc=<(vector_icons_cc_file)',
480+
'--output_h=<(vector_icons_public_h_file)',
481+
],
482+
'message': 'Aggregating vector resources.',
483+
'process_outputs_as_sources': 1,
484+
},
485+
],
486+
# Export a hard dependency because of generated header files.
487+
'hard_dependency': 1,
488+
},
475489
{
476490
'target_name': 'gfx_test_support',
477491
'type': 'static_library',

ui/views/controls/image_view.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "ui/gfx/canvas.h"
1212
#include "ui/gfx/geometry/insets.h"
1313
#include "ui/gfx/paint_vector_icon.h"
14+
#include "ui/gfx/vector_icons_public.h"
1415
#include "ui/views/painter.h"
1516

1617
namespace views {

ui/views/controls/image_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
#include "third_party/skia/include/core/SkColor.h"
99
#include "ui/gfx/image/image_skia.h"
10-
#include "ui/gfx/vector_icons_public.h"
1110
#include "ui/views/view.h"
1211

1312
namespace gfx {
1413
class Canvas;
14+
enum class VectorIconId;
1515
}
1616

1717
namespace views {

ui/views/views.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@
604604
'../events/platform/events_platform.gyp:events_platform',
605605
'../gfx/gfx.gyp:gfx',
606606
'../gfx/gfx.gyp:gfx_geometry',
607+
'../gfx/gfx.gyp:gfx_vector_icons',
607608
'../native_theme/native_theme.gyp:native_theme',
608609
'../resources/ui_resources.gyp:ui_resources',
609610
'../strings/ui_strings.gyp:ui_strings',

0 commit comments

Comments
 (0)