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/alternate_app_list_button.h" | 5 #include "ash/shelf/alternate_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 AlternateAppListButton::kImageBoundsSize = 7; | 31 const int AlternateAppListButton::kImageBoundsSize = 7; |
32 | 32 |
33 | 33 |
34 AlternateAppListButton::AlternateAppListButton(views::ButtonListener* listener, | 34 AlternateAppListButton::AlternateAppListButton(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(ShelfLayoutManager::kShelfSize, | 41 SetSize(gfx::Size(ShelfLayoutManager::kShelfSize, |
42 ShelfLayoutManager::kShelfSize)); | 42 ShelfLayoutManager::kShelfSize)); |
43 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | 43 SetFocusPainter(views::Painter::CreateSolidFocusPainter( |
44 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); | 44 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); |
45 } | 45 } |
46 | 46 |
47 AlternateAppListButton::~AlternateAppListButton() { | 47 AlternateAppListButton::~AlternateAppListButton() { |
48 } | 48 } |
49 | 49 |
50 bool AlternateAppListButton::OnMousePressed(const ui::MouseEvent& event) { | 50 bool AlternateAppListButton::OnMousePressed(const ui::MouseEvent& event) { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 views::Painter::PaintFocusPainter(this, canvas, focus_painter()); | 162 views::Painter::PaintFocusPainter(this, canvas, focus_painter()); |
163 } | 163 } |
164 | 164 |
165 void AlternateAppListButton::GetAccessibleState( | 165 void AlternateAppListButton::GetAccessibleState( |
166 ui::AXViewState* state) { | 166 ui::AXViewState* state) { |
167 state->role = ui::AX_ROLE_BUTTON; | 167 state->role = ui::AX_ROLE_BUTTON; |
168 state->name = host_->GetAccessibleName(this); | 168 state->name = host_->GetAccessibleName(this); |
169 } | 169 } |
170 | 170 |
171 } // namespace ash | 171 } // namespace ash |
OLD | NEW |