| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shelf_button.h" | 5 #include "ash/shelf/shelf_button.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 ShelfButton::ShelfButton(views::ButtonListener* listener, | 231 ShelfButton::ShelfButton(views::ButtonListener* listener, |
| 232 ShelfButtonHost* host, | 232 ShelfButtonHost* host, |
| 233 ShelfLayoutManager* shelf_layout_manager) | 233 ShelfLayoutManager* shelf_layout_manager) |
| 234 : CustomButton(listener), | 234 : CustomButton(listener), |
| 235 host_(host), | 235 host_(host), |
| 236 icon_view_(NULL), | 236 icon_view_(NULL), |
| 237 bar_(new BarView(this)), | 237 bar_(new BarView(this)), |
| 238 state_(STATE_NORMAL), | 238 state_(STATE_NORMAL), |
| 239 shelf_layout_manager_(shelf_layout_manager), | 239 shelf_layout_manager_(shelf_layout_manager), |
| 240 destroyed_flag_(NULL) { | 240 destroyed_flag_(NULL) { |
| 241 set_accessibility_focusable(true); | 241 SetAccessibilityFocusable(true); |
| 242 | 242 |
| 243 const gfx::ShadowValue kShadows[] = { | 243 const gfx::ShadowValue kShadows[] = { |
| 244 gfx::ShadowValue(gfx::Point(0, 2), 0, SkColorSetARGB(0x1A, 0, 0, 0)), | 244 gfx::ShadowValue(gfx::Point(0, 2), 0, SkColorSetARGB(0x1A, 0, 0, 0)), |
| 245 gfx::ShadowValue(gfx::Point(0, 3), 1, SkColorSetARGB(0x1A, 0, 0, 0)), | 245 gfx::ShadowValue(gfx::Point(0, 3), 1, SkColorSetARGB(0x1A, 0, 0, 0)), |
| 246 gfx::ShadowValue(gfx::Point(0, 0), 1, SkColorSetARGB(0x54, 0, 0, 0)), | 246 gfx::ShadowValue(gfx::Point(0, 0), 1, SkColorSetARGB(0x54, 0, 0, 0)), |
| 247 }; | 247 }; |
| 248 icon_shadows_.assign(kShadows, kShadows + arraysize(kShadows)); | 248 icon_shadows_.assign(kShadows, kShadows + arraysize(kShadows)); |
| 249 | 249 |
| 250 AddChildView(bar_); | 250 AddChildView(bar_); |
| 251 } | 251 } |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 views::ImageView::CENTER, | 585 views::ImageView::CENTER, |
| 586 views::ImageView::LEADING)); | 586 views::ImageView::LEADING)); |
| 587 bar_->SchedulePaint(); | 587 bar_->SchedulePaint(); |
| 588 } | 588 } |
| 589 | 589 |
| 590 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); | 590 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); |
| 591 } | 591 } |
| 592 | 592 |
| 593 } // namespace internal | 593 } // namespace internal |
| 594 } // namespace ash | 594 } // namespace ash |
| OLD | NEW |