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

Side by Side Diff: ui/app_list/views/start_page_view.cc

Issue 1693713004: Don't fire a FOCUS accessibility event on a View that doesn't have focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one call to SendFocusAlert Created 4 years, 10 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
« no previous file with comments | « ui/app_list/views/search_result_list_view.cc ('k') | ui/app_list/views/tile_item_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/app_list/views/start_page_view.h" 5 #include "ui/app_list/views/start_page_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 : selected_(false), 79 : selected_(false),
80 custom_launcher_page_name_(custom_launcher_page_name) { 80 custom_launcher_page_name_(custom_launcher_page_name) {
81 set_background(views::Background::CreateSolidBackground(kSelectedColor)); 81 set_background(views::Background::CreateSolidBackground(kSelectedColor));
82 } 82 }
83 ~CustomLauncherPageBackgroundView() override {} 83 ~CustomLauncherPageBackgroundView() override {}
84 84
85 void SetSelected(bool selected) { 85 void SetSelected(bool selected) {
86 selected_ = selected; 86 selected_ = selected;
87 SetVisible(selected); 87 SetVisible(selected);
88 if (selected) 88 if (selected)
89 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); 89 NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
90 } 90 }
91 91
92 bool selected() { return selected_; } 92 bool selected() { return selected_; }
93 93
94 // Overridden from views::View: 94 // Overridden from views::View:
95 void GetAccessibleState(ui::AXViewState* state) override { 95 void GetAccessibleState(ui::AXViewState* state) override {
96 state->role = ui::AX_ROLE_BUTTON; 96 state->role = ui::AX_ROLE_BUTTON;
97 state->name = base::UTF8ToUTF16(custom_launcher_page_name_); 97 state->name = base::UTF8ToUTF16(custom_launcher_page_name_);
98 } 98 }
99 99
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 // is enabled). 496 // is enabled).
497 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0) 497 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0)
498 MaybeOpenCustomLauncherPage(); 498 MaybeOpenCustomLauncherPage();
499 } 499 }
500 500
501 TileItemView* StartPageView::GetTileItemView(size_t index) { 501 TileItemView* StartPageView::GetTileItemView(size_t index) {
502 return tiles_container_->GetTileItemView(index); 502 return tiles_container_->GetTileItemView(index);
503 } 503 }
504 504
505 } // namespace app_list 505 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_list_view.cc ('k') | ui/app_list/views/tile_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698