Commit a9c4f908 authored by mathp@chromium.org's avatar mathp@chromium.org

[Resources] Move roboto.woff and add roboto.woff2 to a roboto/ directory

Previously under resources/contextual_search/, now moving Roboto to its own directory. Also using Roboto2 now.

BUG=401100
R=dbeam@chromium.org, huangs@chromium.org
TBR=jam
TEST=Didn't break Contextual Search promo

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

Cr-Commit-Position: refs/heads/master@{#288386}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288386 0039d316-1c4b-4281-b951-d872f2087c98
parent 3af48b63
......@@ -117,7 +117,6 @@
</if>
<if expr="is_android">
<include name="IDR_CONTEXTUAL_SEARCH_PROMO_JS" file="resources\contextual_search\promo.js" type="BINDATA" />
<include name="IDR_CONTEXTUAL_SEARCH_ROBOTO_WOFF" file="resources\contextual_search\roboto.woff" type="BINDATA" />
</if>
<if expr="enable_printing">
<include name="IDR_CLOUDPRINT_MANIFEST" file="resources\cloud_print_app\manifest.json" type="BINDATA" />
......@@ -216,7 +215,10 @@
<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_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_CSS" file="resources\omnibox\omnibox.css" type="BINDATA" />
<include name="IDR_OMNIBOX_JS" file="resources\omnibox\omnibox.js" type="BINDATA" />
......
......@@ -3,13 +3,14 @@
found in the LICENSE file.
*/
@font-face {
font-family: 'Roboto';
font-family: 'Roboto2';
font-weight: 400;
src: url(/roboto.woff) format('woff');
src: local('Roboto'), local('Roboto2-Regular'),
url(/roboto.woff2) format('woff2'), url(/roboto.woff) format('woff');
}
body {
font-family: 'Roboto';
font-family: 'Roboto2', sans-serif;
font-size: 1em;
margin: 0;
}
......
......@@ -22,7 +22,8 @@ namespace {
const char kPromoHTMLPath[] = "/promo.html";
const char kPromoCSSPath[] = "/promo.css";
const char kPromoJSPath[] = "/promo.js";
const char kPromoRobotoPath[] = "/roboto.woff";
const char kRobotoWoffPath[] = "/roboto.woff";
const char kRobotoWoff2Path[] = "/roboto.woff2";
} // namespace
......@@ -43,8 +44,10 @@ void ContextualSearchPromoSourceAndroid::StartDataRequest(
SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_CSS, callback);
} else if (path == kPromoJSPath) {
SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_JS, callback);
} else if (path == kPromoRobotoPath) {
SendResource(IDR_CONTEXTUAL_SEARCH_ROBOTO_WOFF, callback);
} else if (path == kRobotoWoffPath) {
SendResource(IDR_ROBOTO_WOFF, callback);
} else if (path == kRobotoWoff2Path) {
SendResource(IDR_ROBOTO_WOFF2, callback);
} else {
callback.Run(NULL);
}
......@@ -62,6 +65,7 @@ std::string ContextualSearchPromoSourceAndroid::GetMimeType(
if (EndsWith(path, ".css", false)) return "text/css";
if (EndsWith(path, ".html", false)) return "text/html";
if (EndsWith(path, ".woff", false)) return "font/woff";
if (EndsWith(path, ".woff2", false)) return "font/woff2";
return "";
}
......
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