Commit 07a0ef00 authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

Move local ntp resources into dedicated grd file

Allocate more ids for local ntp resources in preparation
for adding more resources.

Bug: 864763
Change-Id: I9b68fdda795959306d248eec973b86e0506323c7
Reviewed-on: https://chromium-review.googlesource.com/c/1327558Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606996}
parent 85a0304a
......@@ -1567,6 +1567,7 @@ group("extra_resources") {
if (!is_android) {
public_deps += [
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources:local_ntp_resources",
"//chrome/browser/resources:settings_resources",
]
}
......
......@@ -347,32 +347,8 @@
<include name="IDR_LOCAL_DISCOVERY_JS" file="resources\local_discovery\local_discovery.js" flattenhtml="true" type="BINDATA" />
</if>
<include name="IDR_INSTANT_IFRAME_VALIDATION_JS" file="resources\local_ntp\instant_iframe_validation.js" type="BINDATA" />
<include name="IDR_LOCAL_NTP_HTML" file="resources\local_ntp\local_ntp.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CSS" file="resources\local_ntp\local_ntp.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_JS" file="resources\local_ntp\local_ntp.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_VOICE_CSS" file="resources\local_ntp\voice.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_VOICE_JS" file="resources\local_ntp\voice.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_CSS" file="resources\local_ntp\custom_backgrounds.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_JS" file="resources\local_ntp\custom_backgrounds.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_STATE_HTML" file="resources\local_state\local_state.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
<include name="IDR_LOCAL_STATE_JS" file="resources\local_state\local_state.js" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
<include name="IDR_MOST_VISITED_IFRAME_CSS" file="resources\local_ntp\most_visited_iframe.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_HTML" file="resources\local_ntp\most_visited_title.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_CSS" file="resources\local_ntp\most_visited_title.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_JS" file="resources\local_ntp\most_visited_title.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_HTML" file="resources\local_ntp\most_visited_thumbnail.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_CSS" file="resources\local_ntp\most_visited_thumbnail.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_JS" file="resources\local_ntp\most_visited_thumbnail.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_HTML" file="resources\local_ntp\most_visited_single.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_CSS" file="resources\local_ntp\most_visited_single.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_JS" file="resources\local_ntp\most_visited_single.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_UTIL_JS" file="resources\local_ntp\most_visited_util.js" type="BINDATA" flattenhtml="true" />
<include name="IDR_CUSTOM_LINKS_EDIT_HTML" file="resources\local_ntp\custom_links_edit.html" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_CSS" file="resources\local_ntp\custom_links_edit.css" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_JS" file="resources\local_ntp\custom_links_edit.js" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_ADD_SVG" file="resources\local_ntp\icons\add_link.svg" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_MENU_SVG" file="resources\local_ntp\icons\edit_menu.svg" type="BINDATA" />
<include name="IDR_OMNIBOX_HTML" file="resources\omnibox\omnibox.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
<include name="IDR_OMNIBOX_CSS" file="resources\omnibox\omnibox.css" type="BINDATA" compress="gzip" />
<include name="IDR_OMNIBOX_ELEMENT_JS" file="resources\omnibox\omnibox_element.js" type="BINDATA" compress="gzip" />
......
......@@ -126,6 +126,16 @@ if (!is_android) {
output_dir = "$root_gen_dir/chrome"
}
grit("local_ntp_resources") {
source = "local_ntp_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/local_ntp_resources.h",
"local_ntp_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("settings_resources") {
if (optimize_webui) {
source = "settings/settings_resources_vulcanized.grd"
......
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
<outputs>
<output filename="grit/local_ntp_resources.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
<output filename="local_ntp_resources.pak" type="data_package" />
</outputs>
<release seq="1">
<includes>
<include name="IDR_INSTANT_IFRAME_VALIDATION_JS" file="local_ntp\instant_iframe_validation.js" type="BINDATA" />
<include name="IDR_LOCAL_NTP_HTML" file="local_ntp\local_ntp.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CSS" file="local_ntp\local_ntp.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_JS" file="local_ntp\local_ntp.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_VOICE_CSS" file="local_ntp\voice.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_VOICE_JS" file="local_ntp\voice.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_CSS" file="local_ntp\custom_backgrounds.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_JS" file="local_ntp\custom_backgrounds.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_MOST_VISITED_IFRAME_CSS" file="local_ntp\most_visited_iframe.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_HTML" file="local_ntp\most_visited_title.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_CSS" file="local_ntp\most_visited_title.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_TITLE_JS" file="local_ntp\most_visited_title.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_HTML" file="local_ntp\most_visited_thumbnail.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_CSS" file="local_ntp\most_visited_thumbnail.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_THUMBNAIL_JS" file="local_ntp\most_visited_thumbnail.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_HTML" file="local_ntp\most_visited_single.html" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_CSS" file="local_ntp\most_visited_single.css" type="BINDATA" />
<include name="IDR_MOST_VISITED_SINGLE_JS" file="local_ntp\most_visited_single.js" type="BINDATA" />
<include name="IDR_MOST_VISITED_UTIL_JS" file="local_ntp\most_visited_util.js" type="BINDATA" flattenhtml="true" />
<include name="IDR_CUSTOM_LINKS_EDIT_HTML" file="local_ntp\custom_links_edit.html" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_CSS" file="local_ntp\custom_links_edit.css" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_JS" file="local_ntp\custom_links_edit.js" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_ADD_SVG" file="local_ntp\icons\add_link.svg" type="BINDATA" />
<include name="IDR_CUSTOM_LINKS_EDIT_MENU_SVG" file="local_ntp\icons\edit_menu.svg" type="BINDATA" />
</includes>
</release>
</grit>
......@@ -9,7 +9,7 @@
#include "base/bind.h"
#include "base/memory/ref_counted_memory.h"
#include "chrome/browser/search/instant_io_context.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/local_ntp_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/common/previews_state.h"
......
......@@ -45,6 +45,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/local_ntp_resources.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/search_terms_data.h"
......
......@@ -10,7 +10,7 @@
#include "chrome/browser/search/local_files_ntp_source.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/local_ntp_resources.h"
#include "url/gurl.h"
namespace {
......
......@@ -138,12 +138,14 @@ template("chrome_extra_paks") {
# New paks should be added here by default.
sources += [
"$root_gen_dir/chrome/component_extension_resources.pak",
"$root_gen_dir/chrome/local_ntp_resources.pak",
"$root_gen_dir/chrome/settings_resources.pak",
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/headless/headless_lib_resources.pak",
]
deps += [
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources:local_ntp_resources",
"//chrome/browser/resources:settings_resources",
"//content/browser/devtools:devtools_resources",
"//headless:resources",
......
......@@ -94,65 +94,68 @@
"chrome/browser/resources/invalidations_resources.grd": {
"includes": [12400],
},
"chrome/browser/resources/md_extensions/extensions_resources_vulcanized.grd": {
"chrome/browser/resources/local_ntp_resources.grd": {
"includes": [12440],
},
"chrome/browser/resources/md_extensions/extensions_resources_vulcanized.grd": {
"includes": [12500],
},
"chrome/browser/resources/md_extensions/extensions_resources.grd": {
"structures": [12450],
"structures": [12510],
},
"chrome/browser/resources/net_internals_resources.grd": {
"includes": [12540],
"includes": [12600],
},
"chrome/browser/resources/print_preview/print_preview_resources_vulcanized.grd": {
"includes": [12550],
"includes": [12610],
},
"chrome/browser/resources/print_preview/print_preview_resources.grd": {
"structures": [12560],
"structures": [12620],
},
"chrome/browser/resources/quota_internals_resources.grd": {
"includes": [12750],
"includes": [12810],
},
"chrome/browser/resources/settings/settings_resources_vulcanized.grd": {
"includes": [12770],
"includes": [12830],
},
"chrome/browser/resources/settings/settings_resources.grd": {
"structures": [12780],
"structures": [12840],
},
"chrome/browser/resources/sync_file_system_internals_resources.grd": {
"includes": [13280],
"includes": [13340],
},
"chrome/browser/resources/task_scheduler_internals/resources.grd": {
"includes": [13300],
"includes": [13360],
},
"chrome/browser/resources/translate_internals_resources.grd": {
"includes": [13310],
"includes": [13370],
},
"chrome/browser/resources/webapks_ui_resources.grd": {
"includes": [13320],
"includes": [13380],
},
"chrome/browser/resources/welcome/onboarding_welcome/onboarding_welcome_resources.grd": {
"includes": [13330],
"structures": [13380],
"includes": [13390],
"structures": [13440],
},
"chrome/browser/vr/testapp/vr_testapp_resources.grd": {
"includes": [13420],
"includes": [13480],
},
# END chrome/browser section.
# START chrome/ miscellaneous section.
"chrome/common/common_resources.grd": {
"includes": [13430],
"includes": [13650],
},
"chrome/credential_provider/gaiacp/gaia_resources.grd": {
"includes": [13450],
"messages": [13460],
"includes": [13670],
"messages": [13680],
},
"chrome/renderer/resources/renderer_resources.grd": {
"includes": [13500],
"structures": [13600],
"includes": [13720],
"structures": [13830],
},
"chrome/test/data/webui_test_resources.grd": {
"includes": [13650],
"includes": [13870],
},
# END chrome/ miscellaneous section.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment