12345678910111213141516171819202122232425262728293031323334 |
- // Copyright 2018 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #ifndef ASH_SYSTEM_UNIFIED_CURRENT_LOCALE_VIEW_H_
- #define ASH_SYSTEM_UNIFIED_CURRENT_LOCALE_VIEW_H_
- #include "ash/system/model/locale_model.h"
- #include "ash/system/tray/tray_item_view.h"
- namespace ash {
- // The current locale view in UnifiedSystemTray button. The view shows the
- // abbreviation of the current locale (e.g. "DA").
- class CurrentLocaleView : public TrayItemView, public LocaleModel::Observer {
- public:
- explicit CurrentLocaleView(Shelf* shelf);
- CurrentLocaleView(const CurrentLocaleView&) = delete;
- CurrentLocaleView& operator=(const CurrentLocaleView&) = delete;
- ~CurrentLocaleView() override;
- // LocaleModel::Observer:
- void OnLocaleListSet() override;
- // views::TrayItemView:
- const char* GetClassName() const override;
- void HandleLocaleChange() override;
- };
- } // namespace ash
- #endif // ASH_SYSTEM_UNIFIED_CURRENT_LOCALE_VIEW_H_
|