| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/controls/button/button_dropdown.h" | 5 #include "views/controls/button/button_dropdown.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/app_strings.h" |
| 11 #include "views/controls/menu/view_menu_delegate.h" | 11 #include "views/controls/menu/view_menu_delegate.h" |
| 12 #include "views/widget/widget.h" | 12 #include "views/widget/widget.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 | 15 |
| 16 // How long to wait before showing the menu | 16 // How long to wait before showing the menu |
| 17 static const int kMenuTimerDelay = 500; | 17 static const int kMenuTimerDelay = 500; |
| 18 | 18 |
| 19 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
| 20 // | 20 // |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 //////////////////////////////////////////////////////////////////////////////// | 166 //////////////////////////////////////////////////////////////////////////////// |
| 167 // | 167 // |
| 168 // ButtonDropDown - Accessibility | 168 // ButtonDropDown - Accessibility |
| 169 // | 169 // |
| 170 //////////////////////////////////////////////////////////////////////////////// | 170 //////////////////////////////////////////////////////////////////////////////// |
| 171 | 171 |
| 172 bool ButtonDropDown::GetAccessibleDefaultAction(std::wstring* action) { | 172 bool ButtonDropDown::GetAccessibleDefaultAction(std::wstring* action) { |
| 173 DCHECK(action); | 173 DCHECK(action); |
| 174 | 174 |
| 175 action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS)); | 175 action->assign(l10n_util::GetString(IDS_APP_ACCACTION_PRESS)); |
| 176 return true; | 176 return true; |
| 177 } | 177 } |
| 178 | 178 |
| 179 bool ButtonDropDown::GetAccessibleRole(AccessibilityTypes::Role* role) { | 179 bool ButtonDropDown::GetAccessibleRole(AccessibilityTypes::Role* role) { |
| 180 DCHECK(role); | 180 DCHECK(role); |
| 181 | 181 |
| 182 *role = AccessibilityTypes::ROLE_BUTTONDROPDOWN; | 182 *role = AccessibilityTypes::ROLE_BUTTONDROPDOWN; |
| 183 return true; | 183 return true; |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool ButtonDropDown::GetAccessibleState(AccessibilityTypes::State* state) { | 186 bool ButtonDropDown::GetAccessibleState(AccessibilityTypes::State* state) { |
| 187 DCHECK(state); | 187 DCHECK(state); |
| 188 | 188 |
| 189 *state = AccessibilityTypes::STATE_HASPOPUP; | 189 *state = AccessibilityTypes::STATE_HASPOPUP; |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace views | 193 } // namespace views |
| OLD | NEW |