| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/signin/user_manager_ui.h" | 5 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" | 9 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" |
| 10 #include "chrome/browser/ui/webui/theme_source.h" | 10 #include "chrome/browser/ui/webui/theme_source.h" |
| 11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
| 12 #include "content/public/browser/web_ui.h" | 12 #include "content/public/browser/web_ui.h" |
| 13 #include "content/public/browser/web_ui_data_source.h" | 13 #include "content/public/browser/web_ui_data_source.h" |
| 14 #include "grit/browser_resources.h" | 14 #include "grit/browser_resources.h" |
| 15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 16 #include "ui/webui/web_ui_util.h" | 16 #include "ui/webui/web_ui_util.h" |
| 17 | 17 |
| 18 namespace { | 18 // JS file names. |
| 19 // JS file names. | 19 const char kStringsJSPath[] = "strings.js"; |
| 20 const char kStringsJSPath[] = "strings.js"; | 20 const char kUserManagerJSPath[] = "user_manager.js"; |
| 21 const char kUserManagerJSPath[] = "user_manager.js"; | |
| 22 const char kHeaderBarJSPath[] = "header_bar.js"; | |
| 23 const char kAccountPickerJSPath[] = "screen_account_picker.js"; | |
| 24 } | |
| 25 | 21 |
| 26 UserManagerUI::UserManagerUI(content::WebUI* web_ui) | 22 UserManagerUI::UserManagerUI(content::WebUI* web_ui) |
| 27 : WebUIController(web_ui) { | 23 : WebUIController(web_ui) { |
| 28 // The web_ui object takes ownership of the handler, and will | 24 // The web_ui object takes ownership of the handler, and will |
| 29 // destroy it when it (the WebUI) is destroyed. | 25 // destroy it when it (the WebUI) is destroyed. |
| 30 user_manager_screen_handler_ = new UserManagerScreenHandler(); | 26 user_manager_screen_handler_ = new UserManagerScreenHandler(); |
| 31 web_ui->AddMessageHandler(user_manager_screen_handler_); | 27 web_ui->AddMessageHandler(user_manager_screen_handler_); |
| 32 | 28 |
| 33 base::DictionaryValue localized_strings; | 29 base::DictionaryValue localized_strings; |
| 34 GetLocalizedStrings(&localized_strings); | 30 GetLocalizedStrings(&localized_strings); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 user_manager_screen_handler_->GetLocalizedValues(localized_strings); | 62 user_manager_screen_handler_->GetLocalizedValues(localized_strings); |
| 67 webui::SetFontAndTextDirection(localized_strings); | 63 webui::SetFontAndTextDirection(localized_strings); |
| 68 | 64 |
| 69 #if defined(GOOGLE_CHROME_BUILD) | 65 #if defined(GOOGLE_CHROME_BUILD) |
| 70 localized_strings->SetString("buildType", "chrome"); | 66 localized_strings->SetString("buildType", "chrome"); |
| 71 #else | 67 #else |
| 72 localized_strings->SetString("buildType", "chromium"); | 68 localized_strings->SetString("buildType", "chromium"); |
| 73 #endif | 69 #endif |
| 74 } | 70 } |
| 75 | 71 |
| OLD | NEW |