Commit ce9731da authored by alexandrec's avatar alexandrec Committed by Commit bot

Make Roboto accessible from chrome://resources

The Roboto font needs to be used for the Chrome PDF plugin (and will potentially need more users going forward). This change makes it accessible through chrome://resources (web UI) so that it is more broadly available.

BUG=303491

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

Cr-Commit-Position: refs/heads/master@{#311586}
parent 8190d385
...@@ -213,10 +213,6 @@ ...@@ -213,10 +213,6 @@
<include name="IDR_MOST_VISITED_THUMBNAIL_JS" file="resources\local_ntp\most_visited_thumbnail.js" type="BINDATA" /> <include name="IDR_MOST_VISITED_THUMBNAIL_JS" file="resources\local_ntp\most_visited_thumbnail.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_MOST_VISITED_UTIL_JS" file="resources\local_ntp\most_visited_util.js" type="BINDATA" flattenhtml="true" />
<include name="IDR_MOST_VISITED_WINDOW_DISPOSITION_UTIL_JS" file="resources\local_ntp\window_disposition_util.js" type="BINDATA" /> <include name="IDR_MOST_VISITED_WINDOW_DISPOSITION_UTIL_JS" file="resources\local_ntp\window_disposition_util.js" type="BINDATA" />
<if expr="is_android">
<include name="IDR_ROBOTO_WOFF" file="resources\roboto\roboto.woff" type="BINDATA" />
<include name="IDR_ROBOTO_WOFF2" file="resources\roboto\roboto.woff2" type="BINDATA" />
</if>
<include name="IDR_OMNIBOX_HTML" file="resources\omnibox\omnibox.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_OMNIBOX_HTML" file="resources\omnibox\omnibox.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_OMNIBOX_CSS" file="resources\omnibox\omnibox.css" type="BINDATA" /> <include name="IDR_OMNIBOX_CSS" file="resources\omnibox\omnibox.css" type="BINDATA" />
<include name="IDR_OMNIBOX_JS" file="resources\omnibox\omnibox.js" type="BINDATA" /> <include name="IDR_OMNIBOX_JS" file="resources\omnibox\omnibox.js" type="BINDATA" />
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
font-family: 'Roboto2'; font-family: 'Roboto2';
font-weight: 400; font-weight: 400;
src: local('Roboto'), local('Roboto2-Regular'), src: local('Roboto'), local('Roboto2-Regular'),
url(/roboto.woff2) format('woff2'), url(/roboto.woff) format('woff'); url(chrome://resources/roboto/roboto.woff2) format('woff2'),
url(chrome://resources/roboto/roboto.woff) format('woff');
} }
body { body {
......
...@@ -26,8 +26,6 @@ const char kPromoConfigPath[] = "/config.js"; ...@@ -26,8 +26,6 @@ const char kPromoConfigPath[] = "/config.js";
const char kPromoHTMLPath[] = "/promo.html"; const char kPromoHTMLPath[] = "/promo.html";
const char kPromoCSSPath[] = "/promo.css"; const char kPromoCSSPath[] = "/promo.css";
const char kPromoJSPath[] = "/promo.js"; const char kPromoJSPath[] = "/promo.js";
const char kRobotoWoffPath[] = "/roboto.woff";
const char kRobotoWoff2Path[] = "/roboto.woff2";
// Field trial related constants. // Field trial related constants.
const char kContextualSearchFieldTrialName[] = "ContextualSearch"; const char kContextualSearchFieldTrialName[] = "ContextualSearch";
...@@ -80,10 +78,6 @@ void ContextualSearchPromoSourceAndroid::StartDataRequest( ...@@ -80,10 +78,6 @@ void ContextualSearchPromoSourceAndroid::StartDataRequest(
SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_JS, callback); SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_JS, callback);
} else if (path == kPromoConfigPath) { } else if (path == kPromoConfigPath) {
SendConfigResource(callback); SendConfigResource(callback);
} else if (path == kRobotoWoffPath) {
SendResource(IDR_ROBOTO_WOFF, callback);
} else if (path == kRobotoWoff2Path) {
SendResource(IDR_ROBOTO_WOFF2, callback);
} else { } else {
callback.Run(NULL); callback.Run(NULL);
} }
......
...@@ -17,6 +17,10 @@ without changes to the corresponding grd file. --> ...@@ -17,6 +17,10 @@ without changes to the corresponding grd file. -->
<include name="IDR_WEBUI_I18N_TEMPLATE2_JS" file="js/i18n_template2.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_WEBUI_I18N_TEMPLATE2_JS" file="js/i18n_template2.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_WEBUI_JSTEMPLATE_JS" file="js/jstemplate_compiled.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_WEBUI_JSTEMPLATE_JS" file="js/jstemplate_compiled.js" flattenhtml="true" type="BINDATA" />
<!-- Roboto Font -->
<include name="IDR_WEBUI_ROBOTO_ROBOTO_WOFF" file="roboto/roboto.woff" type="BINDATA" />
<include name="IDR_WEBUI_ROBOTO_ROBOTO_WOFF2" file="roboto/roboto.woff2" type="BINDATA" />
<!-- Component apps common image resources - 1x --> <!-- Component apps common image resources - 1x -->
<!-- White button --> <!-- White button -->
<include name="IDR_WEBUI_IMAGES_APPS_BUTTON" <include name="IDR_WEBUI_IMAGES_APPS_BUTTON"
......
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