1 // Copyright 2018 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 ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_ 6 #define ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_ 7 8 #include <string> 9 10 #include "ash/system/tray/tray_detailed_view.h" 11 #include "base/containers/flat_map.h" 12 #include "base/macros.h" 13 14 namespace ash { 15 namespace tray { 16 17 // The detailed view to show when the locale feature button is clicked. 18 class LocaleDetailedView : public TrayDetailedView { 19 public: 20 explicit LocaleDetailedView(DetailedViewDelegate* delegate); 21 ~LocaleDetailedView() override; 22 23 // TrayDetailedView: 24 void HandleViewClicked(views::View* view) override; 25 26 // views::View: 27 const char* GetClassName() const override; 28 29 private: 30 void CreateItems(); 31 32 // The map between the id of the view and the locale it corresponds to. 33 base::flat_map<int, std::string> id_to_locale_; 34 35 DISALLOW_COPY_AND_ASSIGN(LocaleDetailedView); 36 }; 37 38 } // namespace tray 39 } // namespace ash 40 41 #endif // ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_