Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_PLURAL_STRING_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_PLURAL_STRING_HANDLER_H_ | |
| 7 | |
| 8 #include "base/callback_forward.h" | |
|
tsergeant
2017/06/07 04:42:57
Nit: Is this needed? There are no callbacks in thi
calamity
2017/06/07 05:51:39
Removed.
| |
| 9 #include "base/macros.h" | |
| 10 #include "content/public/browser/web_ui_message_handler.h" | |
| 11 | |
| 12 // A handler which provides pluralized strings. | |
| 13 class PluralStringHandler : public content::WebUIMessageHandler { | |
| 14 public: | |
| 15 PluralStringHandler(); | |
| 16 ~PluralStringHandler() override; | |
| 17 | |
| 18 void AddLocalizedString(const std::string& name, int id); | |
| 19 | |
| 20 // WebUIMessageHandler: | |
| 21 void RegisterMessages() override; | |
| 22 | |
| 23 private: | |
| 24 void HandleGetPluralString(const base::ListValue* args); | |
| 25 | |
| 26 std::map<std::string, int> name_to_id_; | |
| 27 | |
| 28 DISALLOW_COPY_AND_ASSIGN(PluralStringHandler); | |
| 29 }; | |
| 30 | |
| 31 #endif // CHROME_BROWSER_UI_WEBUI_PLURAL_STRING_HANDLER_H_ | |
| OLD | NEW |