Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: chrome/browser/ui/views/toolbar/reload_button.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/reload_button.h" 5 #include "chrome/browser/ui/views/toolbar/reload_button.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int text_id = (visible_mode_ == MODE_RELOAD) ? 109 int text_id = (visible_mode_ == MODE_RELOAD) ?
110 reload_tooltip : IDS_TOOLTIP_STOP; 110 reload_tooltip : IDS_TOOLTIP_STOP;
111 tooltip->assign(l10n_util::GetStringUTF16(text_id)); 111 tooltip->assign(l10n_util::GetStringUTF16(text_id));
112 return true; 112 return true;
113 } 113 }
114 114
115 const char* ReloadButton::GetClassName() const { 115 const char* ReloadButton::GetClassName() const {
116 return kViewClassName; 116 return kViewClassName;
117 } 117 }
118 118
119 void ReloadButton::GetAccessibleState(ui::AXViewState* state) { 119 void ReloadButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
120 if (menu_enabled_) 120 if (menu_enabled_)
121 ToolbarButton::GetAccessibleState(state); 121 ToolbarButton::GetAccessibleNodeData(node_data);
122 else 122 else
123 CustomButton::GetAccessibleState(state); 123 CustomButton::GetAccessibleNodeData(node_data);
124 } 124 }
125 125
126 bool ReloadButton::ShouldShowMenu() { 126 bool ReloadButton::ShouldShowMenu() {
127 return menu_enabled_ && (visible_mode_ == MODE_RELOAD); 127 return menu_enabled_ && (visible_mode_ == MODE_RELOAD);
128 } 128 }
129 129
130 void ReloadButton::ShowDropDownMenu(ui::MenuSourceType source_type) { 130 void ReloadButton::ShowDropDownMenu(ui::MenuSourceType source_type) {
131 ToolbarButton::ShowDropDownMenu(source_type); // Blocks. 131 ToolbarButton::ShowDropDownMenu(source_type); // Blocks.
132 ChangeMode(intended_mode_, true); 132 ChangeMode(intended_mode_, true);
133 } 133 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 void ReloadButton::OnDoubleClickTimer() { 253 void ReloadButton::OnDoubleClickTimer() {
254 if (!IsMenuShowing()) 254 if (!IsMenuShowing())
255 ChangeMode(intended_mode_, false); 255 ChangeMode(intended_mode_, false);
256 } 256 }
257 257
258 void ReloadButton::OnStopToReloadTimer() { 258 void ReloadButton::OnStopToReloadTimer() {
259 DCHECK(!IsMenuShowing()); 259 DCHECK(!IsMenuShowing());
260 ChangeMode(intended_mode_, true); 260 ChangeMode(intended_mode_, true);
261 } 261 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/reload_button.h ('k') | chrome/browser/ui/views/toolbar/toolbar_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698