| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/launcher/launcher_view.h" | 5 #include "ash/launcher/launcher_view.h" |
| 6 | 6 |
| 7 #include "ash/launcher/app_launcher_button.h" | 7 #include "ash/launcher/app_launcher_button.h" |
| 8 #include "ash/launcher/launcher_model.h" | 8 #include "ash/launcher/launcher_model.h" |
| 9 #include "ash/launcher/launcher_window_cycler.h" | 9 #include "ash/launcher/launcher_window_cycler.h" |
| 10 #include "ash/launcher/tabbed_launcher_button.h" | 10 #include "ash/launcher/tabbed_launcher_button.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 const LauncherItems& items(model_->items()); | 204 const LauncherItems& items(model_->items()); |
| 205 for (LauncherItems::const_iterator i = items.begin(); i != items.end(); ++i) { | 205 for (LauncherItems::const_iterator i = items.begin(); i != items.end(); ++i) { |
| 206 views::View* child = CreateViewForItem(*i); | 206 views::View* child = CreateViewForItem(*i); |
| 207 child->SetPaintToLayer(true); | 207 child->SetPaintToLayer(true); |
| 208 view_model_->Add(child, static_cast<int>(i - items.begin())); | 208 view_model_->Add(child, static_cast<int>(i - items.begin())); |
| 209 AddChildView(child); | 209 AddChildView(child); |
| 210 } | 210 } |
| 211 | 211 |
| 212 overflow_button_ = new views::ImageButton(this); | 212 overflow_button_ = new views::ImageButton(this); |
| 213 overflow_button_->set_focusable(true); |
| 213 overflow_button_->SetImage( | 214 overflow_button_->SetImage( |
| 214 views::CustomButton::BS_NORMAL, | 215 views::CustomButton::BS_NORMAL, |
| 215 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToSkBitmap()); | 216 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToSkBitmap()); |
| 216 overflow_button_->SetImage( | 217 overflow_button_->SetImage( |
| 217 views::CustomButton::BS_HOT, | 218 views::CustomButton::BS_HOT, |
| 218 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToSkBitmap()); | 219 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToSkBitmap()); |
| 219 overflow_button_->SetImage( | 220 overflow_button_->SetImage( |
| 220 views::CustomButton::BS_PUSHED, | 221 views::CustomButton::BS_PUSHED, |
| 221 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToSkBitmap()); | 222 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToSkBitmap()); |
| 222 ConfigureChildView(overflow_button_); | 223 ConfigureChildView(overflow_button_); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 cycler_->Cycle(); | 638 cycler_->Cycle(); |
| 638 break; | 639 break; |
| 639 | 640 |
| 640 default: | 641 default: |
| 641 NOTREACHED(); | 642 NOTREACHED(); |
| 642 } | 643 } |
| 643 } | 644 } |
| 644 | 645 |
| 645 } // namespace internal | 646 } // namespace internal |
| 646 } // namespace ash | 647 } // namespace ash |
| OLD | NEW |