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 "ash/shelf/app_list_button.h" | 5 #include "ash/shelf/app_list_button.h" |
6 | 6 |
7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/shelf/shelf_button.h" | 9 #include "ash/shelf/shelf_button.h" |
10 #include "ash/shelf/shelf_button_host.h" | 10 #include "ash/shelf/shelf_button_host.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // static | 30 // static |
31 const int AppListButton::kImageBoundsSize = 7; | 31 const int AppListButton::kImageBoundsSize = 7; |
32 | 32 |
33 | 33 |
34 AppListButton::AppListButton(views::ButtonListener* listener, | 34 AppListButton::AppListButton(views::ButtonListener* listener, |
35 ShelfButtonHost* host, | 35 ShelfButtonHost* host, |
36 ShelfWidget* shelf_widget) | 36 ShelfWidget* shelf_widget) |
37 : views::ImageButton(listener), | 37 : views::ImageButton(listener), |
38 host_(host), | 38 host_(host), |
39 shelf_widget_(shelf_widget) { | 39 shelf_widget_(shelf_widget) { |
40 SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE)); | 40 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_TITLE)); |
41 SetSize(gfx::Size(kShelfSize, kShelfSize)); | 41 SetSize(gfx::Size(kShelfSize, kShelfSize)); |
42 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | 42 SetFocusPainter(views::Painter::CreateSolidFocusPainter( |
43 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); | 43 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); |
44 } | 44 } |
45 | 45 |
46 AppListButton::~AppListButton() { | 46 AppListButton::~AppListButton() { |
47 } | 47 } |
48 | 48 |
49 bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { | 49 bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { |
50 ImageButton::OnMousePressed(event); | 50 ImageButton::OnMousePressed(event); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 views::Painter::PaintFocusPainter(this, canvas, focus_painter()); | 161 views::Painter::PaintFocusPainter(this, canvas, focus_painter()); |
162 } | 162 } |
163 | 163 |
164 void AppListButton::GetAccessibleState(ui::AXViewState* state) { | 164 void AppListButton::GetAccessibleState(ui::AXViewState* state) { |
165 state->role = ui::AX_ROLE_BUTTON; | 165 state->role = ui::AX_ROLE_BUTTON; |
166 state->name = host_->GetAccessibleName(this); | 166 state->name = host_->GetAccessibleName(this); |
167 } | 167 } |
168 | 168 |
169 } // namespace ash | 169 } // namespace ash |
OLD | NEW |