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 "chrome/browser/chromeos/status/caps_lock_menu_button.h" | 5 #include "chrome/browser/chromeos/status/caps_lock_menu_button.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 //////////////////////////////////////////////////////////////////////////////// | 110 //////////////////////////////////////////////////////////////////////////////// |
111 // views::MenuDelegate implementation: | 111 // views::MenuDelegate implementation: |
112 | 112 |
113 string16 CapsLockMenuButton::GetLabel(int id) const { | 113 string16 CapsLockMenuButton::GetLabel(int id) const { |
114 return string16(); | 114 return string16(); |
115 } | 115 } |
116 | 116 |
117 //////////////////////////////////////////////////////////////////////////////// | 117 //////////////////////////////////////////////////////////////////////////////// |
118 // views::MenuButtonDelegate implementation: | 118 // views::MenuButtonListener implementation: |
119 | 119 |
120 void CapsLockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { | 120 void CapsLockMenuButton::OnMenuButtonClicked(views::View* source, |
| 121 const gfx::Point& point) { |
121 static const int kDummyCommandId = 1000; | 122 static const int kDummyCommandId = 1000; |
122 | 123 |
123 if (IsBubbleShown()) | 124 if (IsBubbleShown()) |
124 HideBubble(); | 125 HideBubble(); |
125 | 126 |
126 views::MenuItemView* menu = new views::MenuItemView(this); | 127 views::MenuItemView* menu = new views::MenuItemView(this); |
127 // MenuRunner takes ownership of |menu|. | 128 // MenuRunner takes ownership of |menu|. |
128 menu_runner_.reset(new views::MenuRunner(menu)); | 129 menu_runner_.reset(new views::MenuRunner(menu)); |
129 views::MenuItemView* submenu = menu->AppendMenuItem( | 130 views::MenuItemView* submenu = menu->AppendMenuItem( |
130 kDummyCommandId, | 131 kDummyCommandId, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 PrefService* prefs = GetPrefService(); | 282 PrefService* prefs = GetPrefService(); |
282 if (prefs) { | 283 if (prefs) { |
283 initialized_prefs_ = true; | 284 initialized_prefs_ = true; |
284 remap_search_key_to_.Init( | 285 remap_search_key_to_.Init( |
285 prefs::kLanguageXkbRemapSearchKeyTo, prefs, this); | 286 prefs::kLanguageXkbRemapSearchKeyTo, prefs, this); |
286 } | 287 } |
287 } | 288 } |
288 } | 289 } |
289 | 290 |
290 } // namespace chromeos | 291 } // namespace chromeos |
OLD | NEW |