locale_detailed_view.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifndef ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_
  5. #define ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_
  6. #include <string>
  7. #include "ash/system/tray/tray_detailed_view.h"
  8. #include "base/containers/flat_map.h"
  9. #include "ui/base/metadata/metadata_header_macros.h"
  10. namespace ash {
  11. // The detailed view to show when the locale feature button is clicked.
  12. class LocaleDetailedView : public TrayDetailedView {
  13. public:
  14. METADATA_HEADER(LocaleDetailedView);
  15. explicit LocaleDetailedView(DetailedViewDelegate* delegate);
  16. LocaleDetailedView(const LocaleDetailedView&) = delete;
  17. LocaleDetailedView& operator=(const LocaleDetailedView&) = delete;
  18. ~LocaleDetailedView() override;
  19. // TrayDetailedView:
  20. void HandleViewClicked(views::View* view) override;
  21. private:
  22. void CreateItems();
  23. // The map between the id of the view and the locale it corresponds to.
  24. base::flat_map<int, std::string> id_to_locale_;
  25. };
  26. } // namespace ash
  27. #endif // ASH_SYSTEM_LOCALE_LOCALE_DETAILED_VIEW_H_