| 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/launcher_button.h" | 7 #include "ash/launcher/launcher_button.h" |
| 8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
| 9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
| 10 #include "ash/launcher/launcher_window_cycler.h" | 10 #include "ash/launcher/launcher_window_cycler.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 bounds_animator_->AnimateViewTo(view_model_->view_at(i), | 325 bounds_animator_->AnimateViewTo(view_model_->view_at(i), |
| 326 view_model_->ideal_bounds(i)); | 326 view_model_->ideal_bounds(i)); |
| 327 } | 327 } |
| 328 overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds); | 328 overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds); |
| 329 } | 329 } |
| 330 | 330 |
| 331 views::View* LauncherView::CreateViewForItem(const LauncherItem& item) { | 331 views::View* LauncherView::CreateViewForItem(const LauncherItem& item) { |
| 332 views::View* view = NULL; | 332 views::View* view = NULL; |
| 333 switch (item.type) { | 333 switch (item.type) { |
| 334 case TYPE_TABBED: { | 334 case TYPE_TABBED: { |
| 335 TabbedLauncherButton* button = TabbedLauncherButton::Create(this, this); | 335 TabbedLauncherButton* button = |
| 336 TabbedLauncherButton::Create( |
| 337 this, |
| 338 this, |
| 339 item.is_incognito ? |
| 340 TabbedLauncherButton::STATE_INCOGNITO : |
| 341 TabbedLauncherButton::STATE_NOT_INCOGNITO); |
| 336 button->SetTabImage(item.image); | 342 button->SetTabImage(item.image); |
| 337 button->set_context_menu_controller(this); | 343 button->set_context_menu_controller(this); |
| 338 ReflectItemStatus(item, button); | 344 ReflectItemStatus(item, button); |
| 339 view = button; | 345 view = button; |
| 340 break; | 346 break; |
| 341 } | 347 } |
| 342 | 348 |
| 343 case TYPE_APP: { | 349 case TYPE_APP: { |
| 344 LauncherButton* button = LauncherButton::Create(this, this); | 350 LauncherButton* button = LauncherButton::Create(this, this); |
| 345 button->SetImage(item.image); | 351 button->SetImage(item.image); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 // code. | 733 // code. |
| 728 if (launcher_menu_runner_->RunMenuAt( | 734 if (launcher_menu_runner_->RunMenuAt( |
| 729 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 735 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 730 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 736 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
| 731 return; | 737 return; |
| 732 #endif | 738 #endif |
| 733 } | 739 } |
| 734 | 740 |
| 735 } // namespace internal | 741 } // namespace internal |
| 736 } // namespace ash | 742 } // namespace ash |
| OLD | NEW |