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

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

Issue 642313002: Implemented UI for the meetings controller out-of-box. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_point
Patch Set: Empty line removed. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 OobeUI::kLockDisplay, 65 OobeUI::kLockDisplay,
66 OobeUI::kUserAddingDisplay, 66 OobeUI::kUserAddingDisplay,
67 OobeUI::kAppLaunchSplashDisplay 67 OobeUI::kAppLaunchSplashDisplay
68 }; 68 };
69 69
70 const char kStringsJSPath[] = "strings.js"; 70 const char kStringsJSPath[] = "strings.js";
71 const char kLoginJSPath[] = "login.js"; 71 const char kLoginJSPath[] = "login.js";
72 const char kOobeJSPath[] = "oobe.js"; 72 const char kOobeJSPath[] = "oobe.js";
73 const char kKeyboardUtilsJSPath[] = "keyboard_utils.js"; 73 const char kKeyboardUtilsJSPath[] = "keyboard_utils.js";
74 const char kDemoUserLoginJSPath[] = "demo_user_login.js"; 74 const char kDemoUserLoginJSPath[] = "demo_user_login.js";
75 const char kCustomElementsHTMLPath[] = "custom_elements.html";
76 const char kCustomElementsJSPath[] = "custom_elements.js";
75 77
76 // Paths for deferred resource loading. 78 // Paths for deferred resource loading.
77 const char kEnrollmentHTMLPath[] = "enrollment.html"; 79 const char kEnrollmentHTMLPath[] = "enrollment.html";
78 const char kEnrollmentCSSPath[] = "enrollment.css"; 80 const char kEnrollmentCSSPath[] = "enrollment.css";
79 const char kEnrollmentJSPath[] = "enrollment.js"; 81 const char kEnrollmentJSPath[] = "enrollment.js";
80 82
81 void AddPolymerResourcesPaths(content::WebUIDataSource* source) { 83 void AddPolymerResourcesPaths(content::WebUIDataSource* source) {
82 for (const auto& mapping: GetPolymerResourcesMap()) 84 for (const auto& mapping: GetPolymerResourcesMap())
83 source->AddResourcePath(mapping.first, mapping.second); 85 source->AddResourcePath(mapping.first, mapping.second);
84 } 86 }
(...skipping 25 matching lines...) Expand all
110 "frame-src chrome://terms/ %s/;", 112 "frame-src chrome://terms/ %s/;",
111 extensions::kGaiaAuthExtensionOrigin)); 113 extensions::kGaiaAuthExtensionOrigin));
112 114
113 // Serve deferred resources. 115 // Serve deferred resources.
114 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); 116 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML);
115 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS); 117 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS);
116 source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS); 118 source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS);
117 119
118 if (display_type == OobeUI::kOobeDisplay) { 120 if (display_type == OobeUI::kOobeDisplay) {
119 AddPolymerResourcesPaths(source); 121 AddPolymerResourcesPaths(source);
122 source->AddResourcePath(kCustomElementsHTMLPath, IDR_CUSTOM_ELEMENTS_HTML);
123 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_JS);
124
120 source->AddResourcePath("Roboto-Thin.ttf", IDR_FONT_ROBOTO_THIN); 125 source->AddResourcePath("Roboto-Thin.ttf", IDR_FONT_ROBOTO_THIN);
121 source->AddResourcePath("Roboto-Light.ttf", IDR_FONT_ROBOTO_LIGHT); 126 source->AddResourcePath("Roboto-Light.ttf", IDR_FONT_ROBOTO_LIGHT);
127 source->AddResourcePath("Roboto-Regular.ttf", IDR_FONT_ROBOTO_REGULAR);
128 source->AddResourcePath("Roboto-Medium.ttf", IDR_FONT_ROBOTO_MEDIUM);
122 source->AddResourcePath("Roboto-Bold.ttf", IDR_FONT_ROBOTO_BOLD); 129 source->AddResourcePath("Roboto-Bold.ttf", IDR_FONT_ROBOTO_BOLD);
123 } 130 }
124 131
125 return source; 132 return source;
126 } 133 }
127 134
128 std::string GetDisplayType(const GURL& url) { 135 std::string GetDisplayType(const GURL& url) {
129 std::string path = url.path().size() ? url.path().substr(1) : ""; 136 std::string path = url.path().size() ? url.path().substr(1) : "";
130 if (std::find(kKnownDisplayTypes, 137 if (std::find(kKnownDisplayTypes,
131 kKnownDisplayTypes + arraysize(kKnownDisplayTypes), 138 kKnownDisplayTypes + arraysize(kKnownDisplayTypes),
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 DCHECK(screen_ids_.count(screen)) 562 DCHECK(screen_ids_.count(screen))
556 << "Screen should be registered in InitializeScreenMaps()"; 563 << "Screen should be registered in InitializeScreenMaps()";
557 Screen new_screen = screen_ids_[screen]; 564 Screen new_screen = screen_ids_[screen];
558 FOR_EACH_OBSERVER(Observer, 565 FOR_EACH_OBSERVER(Observer,
559 observer_list_, 566 observer_list_,
560 OnCurrentScreenChanged(current_screen_, new_screen)); 567 OnCurrentScreenChanged(current_screen_, new_screen));
561 current_screen_ = new_screen; 568 current_screen_ = new_screen;
562 } 569 }
563 570
564 } // namespace chromeos 571 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/controller_pairing_screen_handler.cc ('k') | ui/login/screen_container.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698