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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc

Issue 408103002: Added accessible name to bookmark_bar_instructions_view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months 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 (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/ui/views/bookmarks/bookmark_bar_instructions_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 void BookmarkBarInstructionsView::ViewHierarchyChanged( 94 void BookmarkBarInstructionsView::ViewHierarchyChanged(
95 const ViewHierarchyChangedDetails& details) { 95 const ViewHierarchyChangedDetails& details) {
96 if (!updated_colors_ && details.is_add && GetWidget()) 96 if (!updated_colors_ && details.is_add && GetWidget())
97 UpdateColors(); 97 UpdateColors();
98 } 98 }
99 99
100 void BookmarkBarInstructionsView::GetAccessibleState( 100 void BookmarkBarInstructionsView::GetAccessibleState(
101 ui::AXViewState* state) { 101 ui::AXViewState* state) {
102 state->role = ui::AX_ROLE_GROUP; 102 instructions_->GetAccessibleState(state);
103 state->role = ui::AX_ROLE_BUTTON;
David Tseng 2014/07/22 04:50:49 Can we get a TODO(evy) here that links to a bug ex
evy 2014/07/22 05:00:38 I was hoping maybe we could do a fix tomorrow, but
103 } 104 }
104 105
105 void BookmarkBarInstructionsView::LinkClicked(views::Link* source, 106 void BookmarkBarInstructionsView::LinkClicked(views::Link* source,
106 int event_flags) { 107 int event_flags) {
107 delegate_->ShowImportDialog(); 108 delegate_->ShowImportDialog();
108 } 109 }
109 110
110 void BookmarkBarInstructionsView::ShowContextMenuForView( 111 void BookmarkBarInstructionsView::ShowContextMenuForView(
111 views::View* source, 112 views::View* source,
112 const gfx::Point& point, 113 const gfx::Point& point,
113 ui::MenuSourceType source_type) { 114 ui::MenuSourceType source_type) {
114 // Do nothing here, we don't want to show the Bookmarks context menu when 115 // Do nothing here, we don't want to show the Bookmarks context menu when
115 // the user right clicks on the "Import bookmarks now" link. 116 // the user right clicks on the "Import bookmarks now" link.
116 } 117 }
117 118
118 void BookmarkBarInstructionsView::UpdateColors() { 119 void BookmarkBarInstructionsView::UpdateColors() {
119 // We don't always have a theme provider (ui tests, for example). 120 // We don't always have a theme provider (ui tests, for example).
120 const ui::ThemeProvider* theme_provider = GetThemeProvider(); 121 const ui::ThemeProvider* theme_provider = GetThemeProvider();
121 if (!theme_provider) 122 if (!theme_provider)
122 return; 123 return;
123 updated_colors_ = true; 124 updated_colors_ = true;
124 SkColor text_color = 125 SkColor text_color =
125 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT); 126 theme_provider->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT);
126 instructions_->SetEnabledColor(text_color); 127 instructions_->SetEnabledColor(text_color);
127 if (import_link_) 128 if (import_link_)
128 import_link_->SetEnabledColor(text_color); 129 import_link_->SetEnabledColor(text_color);
129 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698