OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/views/toolbar/toolbar_button.h" | 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 | 126 |
127 LabelButton::OnGestureEvent(event); | 127 LabelButton::OnGestureEvent(event); |
128 } | 128 } |
129 | 129 |
130 void ToolbarButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { | 130 void ToolbarButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
131 CustomButton::GetAccessibleNodeData(node_data); | 131 CustomButton::GetAccessibleNodeData(node_data); |
132 node_data->role = ui::AX_ROLE_BUTTON_DROP_DOWN; | 132 node_data->role = ui::AX_ROLE_BUTTON_DROP_DOWN; |
133 node_data->AddState(ui::AX_STATE_HASPOPUP); | 133 node_data->AddState(ui::AX_STATE_HASPOPUP); |
134 if (enabled()) { | 134 if (enabled()) { |
135 node_data->AddIntAttribute(ui::AX_ATTR_ACTION, | 135 node_data->AddIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB, |
136 ui::AX_SUPPORTED_ACTION_PRESS); | 136 ui::AX_DEFAULT_ACTION_VERB_PRESS); |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 std::unique_ptr<views::LabelButtonBorder> ToolbarButton::CreateDefaultBorder() | 140 std::unique_ptr<views::LabelButtonBorder> ToolbarButton::CreateDefaultBorder() |
141 const { | 141 const { |
142 std::unique_ptr<views::LabelButtonBorder> border = | 142 std::unique_ptr<views::LabelButtonBorder> border = |
143 views::LabelButton::CreateDefaultBorder(); | 143 views::LabelButton::CreateDefaultBorder(); |
144 | 144 |
145 if (ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme()) | 145 if (ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme()) |
146 border->set_insets(gfx::Insets(kInteriorPadding)); | 146 border->set_insets(gfx::Insets(kInteriorPadding)); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 if (state() != STATE_DISABLED) | 228 if (state() != STATE_DISABLED) |
229 SetState(STATE_NORMAL); | 229 SetState(STATE_NORMAL); |
230 | 230 |
231 menu_runner_.reset(); | 231 menu_runner_.reset(); |
232 menu_model_adapter_.reset(); | 232 menu_model_adapter_.reset(); |
233 } | 233 } |
234 | 234 |
235 const char* ToolbarButton::GetClassName() const { | 235 const char* ToolbarButton::GetClassName() const { |
236 return "ToolbarButton"; | 236 return "ToolbarButton"; |
237 } | 237 } |
OLD | NEW |