Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4626)

Unified Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 599273004: Polished UI for the host side of pairing flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_point
Patch Set: Removed TODO. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index d3220c2c393022eb3dbae6639e50713f7f3385df..bfb8ae34696f3a56efcc16f62424c65ea485fec9 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -35,6 +35,7 @@
#include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
+#include "chrome/browser/ui/webui/chromeos/login/polymer_resources_map.h"
#include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h"
@@ -50,6 +51,7 @@
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "grit/browser_resources.h"
+#include "grit/chrome_unscaled_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/web_ui_util.h"
@@ -76,6 +78,14 @@ const char kEnrollmentHTMLPath[] = "enrollment.html";
const char kEnrollmentCSSPath[] = "enrollment.css";
const char kEnrollmentJSPath[] = "enrollment.js";
+void AddPolymerResourcesPaths(content::WebUIDataSource* source) {
+ const std::vector<std::pair<std::string, int>>& resources =
+ GetPolymerResourcesMap();
+ for (size_t i = 0; i < resources.size(); ++i) {
+ source->AddResourcePath(resources[i].first, resources[i].second);
+ }
Nikita (slow) 2014/09/25 20:20:00 nit: drop {}
dzhioev (left Google) 2014/09/26 22:56:11 Done.
+}
+
// Creates a WebUIDataSource for chrome://oobe
content::WebUIDataSource* CreateOobeUIDataSource(
const base::DictionaryValue& localized_strings,
@@ -109,6 +119,13 @@ content::WebUIDataSource* CreateOobeUIDataSource(
source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS);
source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS);
+ if (display_type == OobeUI::kOobeDisplay) {
+ AddPolymerResourcesPaths(source);
+ source->AddResourcePath("Roboto-Thin.ttf", IDR_FONT_ROBOTO_THIN);
Nikita (slow) 2014/09/25 20:20:00 nit: I think it makes sense to file a tracking bug
dzhioev (left Google) 2014/09/26 22:56:11 Agree, will file on Monday.
+ source->AddResourcePath("Roboto-Light.ttf", IDR_FONT_ROBOTO_LIGHT);
+ source->AddResourcePath("Roboto-Bold.ttf", IDR_FONT_ROBOTO_BOLD);
+ }
+
return source;
}

Powered by Google App Engine
This is Rietveld 408576698