Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2010 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_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/browser/chromeos/cros/language_library.h" | |
| 11 #include "chrome/browser/chromeos/language_preferences.h" | |
| 12 #include "chrome/browser/pref_member.h" | |
| 13 #include "chrome/browser/views/options/options_page_view.h" | |
| 14 #include "views/controls/button/checkbox.h" | |
| 15 #include "views/controls/label.h" | |
| 16 #include "views/window/dialog_delegate.h" | |
| 17 | |
| 18 namespace chromeos { | |
| 19 | |
| 20 // A dialog box for showing Traditional Chinese (Pinyin) input method | |
| 21 // preferences. | |
| 22 class LanguagePinyinConfigView : public views::ButtonListener, | |
| 23 public views::DialogDelegate, | |
| 24 public OptionsPageView { | |
| 25 public: | |
| 26 explicit LanguagePinyinConfigView(Profile* profile); | |
| 27 virtual ~LanguagePinyinConfigView(); | |
| 28 | |
| 29 // views::ButtonListener overrides. | |
| 30 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | |
| 31 | |
| 32 // views::DialogDelegate overrides. | |
| 33 virtual bool IsModal() const { return true; } | |
| 34 virtual views::View* GetContentsView() { return this; } | |
| 35 virtual std::wstring GetWindowTitle() const; | |
| 36 | |
| 37 // views::View overrides. | |
| 38 virtual void Layout(); | |
| 39 virtual gfx::Size GetPreferredSize(); | |
| 40 | |
| 41 // OptionsPageView overrides. | |
| 42 virtual void InitControlLayout(); | |
| 43 | |
| 44 // NotificationObserver overrides. | |
| 45 virtual void Observe(NotificationType type, | |
| 46 const NotificationSource& source, | |
| 47 const NotificationDetails& details); | |
| 48 | |
| 49 private: | |
| 50 // Updates the pinyin checkboxes. | |
| 51 void NotifyPrefChanged(); | |
| 52 | |
| 53 BooleanPrefMember pinyin_boolean_prefs_[kNumPinyinBooleanPrefs]; | |
| 54 // TODO(yusukes): Support integer prefs if needed. | |
|
tfarina (gmail-do not use)
2010/04/27 18:14:21
I guess this belongs to |pinyin_boolean_prefs_|, i
| |
| 55 views::View* contents_; | |
| 56 | |
| 57 // A checkboxes for Pinyin. | |
|
tfarina (gmail-do not use)
2010/04/27 18:14:21
nit: The checkboxes?
| |
| 58 views::Checkbox* pinyin_boolean_checkboxes_[kNumPinyinBooleanPrefs]; | |
| 59 | |
| 60 DISALLOW_COPY_AND_ASSIGN(LanguagePinyinConfigView); | |
| 61 }; | |
| 62 | |
| 63 } // namespace chromeos | |
| 64 | |
| 65 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_ | |
| OLD | NEW |