| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_LOGIN_KEYBOARD_SWITCH_MENU_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "chrome/browser/chromeos/status/input_method_menu.h" | |
| 13 | |
| 14 namespace chromeos { | |
| 15 | |
| 16 // A class for the button in the OOBE network configuration screen which expands | |
| 17 // a dropdown menu for switching keyboard layout. Note that the InputMethodMenu | |
| 18 // class implements the views::ViewMenuDelegate interface. | |
| 19 class KeyboardSwitchMenu : public InputMethodMenu { | |
| 20 public: | |
| 21 KeyboardSwitchMenu(); | |
| 22 virtual ~KeyboardSwitchMenu() {} | |
| 23 | |
| 24 // InputMethodMenu::InputMethodMenuHost implementation. | |
| 25 virtual void UpdateUI(const std::string& input_method_id, | |
| 26 const string16& name, | |
| 27 const string16& tooltip, | |
| 28 size_t num_active_input_methods) OVERRIDE; | |
| 29 virtual bool ShouldSupportConfigUI() OVERRIDE; | |
| 30 virtual void OpenConfigUI() OVERRIDE {} | |
| 31 | |
| 32 // views::ViewMenuDelegate implementation which overrides the implementation | |
| 33 // in InputMethodMenu. | |
| 34 virtual void RunMenu(views::View* source, const gfx::Point& pt); | |
| 35 | |
| 36 // Returns current keyboard name to be placed on the keyboard menu-button. | |
| 37 string16 GetCurrentKeyboardName() const; | |
| 38 | |
| 39 private: | |
| 40 DISALLOW_COPY_AND_ASSIGN(KeyboardSwitchMenu); | |
| 41 }; | |
| 42 | |
| 43 } // namespace chromeos | |
| 44 | |
| 45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_SWITCH_MENU_H_ | |
| OLD | NEW |