OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/system/locale/tray_locale.h" | 5 #include "ash/system/locale/tray_locale.h" |
6 | 6 |
| 7 #include "ash/system/tray/system_tray.h" |
7 #include "ash/system/tray/tray_constants.h" | 8 #include "ash/system/tray/tray_constants.h" |
8 #include "ash/system/tray/tray_notification_view.h" | 9 #include "ash/system/tray/tray_notification_view.h" |
9 #include "ash/system/tray/tray_views.h" | 10 #include "ash/system/tray/tray_views.h" |
10 #include "base/string16.h" | 11 #include "base/string16.h" |
11 #include "grit/ash_resources.h" | 12 #include "grit/ash_resources.h" |
12 #include "grit/ash_strings.h" | 13 #include "grit/ash_strings.h" |
13 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
14 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
15 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
16 #include "ui/views/controls/label.h" | 17 #include "ui/views/controls/label.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 103 } |
103 | 104 |
104 private: | 105 private: |
105 LocaleObserver::Delegate* delegate_; | 106 LocaleObserver::Delegate* delegate_; |
106 | 107 |
107 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationView); | 108 DISALLOW_COPY_AND_ASSIGN(LocaleNotificationView); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace tray | 111 } // namespace tray |
111 | 112 |
112 TrayLocale::TrayLocale() | 113 TrayLocale::TrayLocale(SystemTray* system_tray) |
113 : notification_(NULL), | 114 : SystemTrayItem(system_tray), |
| 115 notification_(NULL), |
114 delegate_(NULL) { | 116 delegate_(NULL) { |
115 } | 117 } |
116 | 118 |
117 TrayLocale::~TrayLocale() { | 119 TrayLocale::~TrayLocale() { |
118 } | 120 } |
119 | 121 |
120 views::View* TrayLocale::CreateNotificationView(user::LoginStatus status) { | 122 views::View* TrayLocale::CreateNotificationView(user::LoginStatus status) { |
121 if (!delegate_) | 123 if (!delegate_) |
122 return NULL; | 124 return NULL; |
123 CHECK(notification_ == NULL); | 125 CHECK(notification_ == NULL); |
(...skipping 15 matching lines...) Expand all Loading... |
139 from_locale_ = from_locale; | 141 from_locale_ = from_locale; |
140 to_locale_ = to_locale; | 142 to_locale_ = to_locale; |
141 if (notification_) | 143 if (notification_) |
142 notification_->Update(delegate, cur_locale_, from_locale_, to_locale_); | 144 notification_->Update(delegate, cur_locale_, from_locale_, to_locale_); |
143 else | 145 else |
144 ShowNotificationView(); | 146 ShowNotificationView(); |
145 } | 147 } |
146 | 148 |
147 } // namespace internal | 149 } // namespace internal |
148 } // namespace ash | 150 } // namespace ash |
OLD | NEW |