OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |