| 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_icon_observer.h" | 9 #include "ash/launcher/launcher_icon_observer.h" |
| 10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 bool LauncherView::IsShowingMenu() const { | 310 bool LauncherView::IsShowingMenu() const { |
| 311 #if !defined(OS_MACOSX) | 311 #if !defined(OS_MACOSX) |
| 312 return (overflow_menu_runner_.get() && | 312 return (overflow_menu_runner_.get() && |
| 313 overflow_menu_runner_->IsRunning()) || | 313 overflow_menu_runner_->IsRunning()) || |
| 314 (launcher_menu_runner_.get() && | 314 (launcher_menu_runner_.get() && |
| 315 launcher_menu_runner_->IsRunning()); | 315 launcher_menu_runner_->IsRunning()); |
| 316 #endif | 316 #endif |
| 317 return false; | 317 return false; |
| 318 } | 318 } |
| 319 | 319 |
| 320 views::View* LauncherView::GetAppListButtonView() const { |
| 321 for (int i = 0; i < model_->item_count(); ++i) { |
| 322 if (model_->items()[i].type == TYPE_APP_LIST) |
| 323 return view_model_->view_at(i); |
| 324 } |
| 325 |
| 326 NOTREACHED() << "Applist button not found"; |
| 327 return NULL; |
| 328 } |
| 329 |
| 320 //////////////////////////////////////////////////////////////////////////////// | 330 //////////////////////////////////////////////////////////////////////////////// |
| 321 // LauncherView, FocusTraversable implementation: | 331 // LauncherView, FocusTraversable implementation: |
| 322 | 332 |
| 323 views::FocusSearch* LauncherView::GetFocusSearch() { | 333 views::FocusSearch* LauncherView::GetFocusSearch() { |
| 324 return focus_search_.get(); | 334 return focus_search_.get(); |
| 325 } | 335 } |
| 326 | 336 |
| 327 views::FocusTraversable* LauncherView::GetFocusTraversableParent() { | 337 views::FocusTraversable* LauncherView::GetFocusTraversableParent() { |
| 328 return parent()->GetFocusTraversable(); | 338 return parent()->GetFocusTraversable(); |
| 329 } | 339 } |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 923 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 914 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 924 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
| 915 return; | 925 return; |
| 916 | 926 |
| 917 Shell::GetInstance()->UpdateShelfVisibility(); | 927 Shell::GetInstance()->UpdateShelfVisibility(); |
| 918 #endif | 928 #endif |
| 919 } | 929 } |
| 920 | 930 |
| 921 } // namespace internal | 931 } // namespace internal |
| 922 } // namespace ash | 932 } // namespace ash |
| OLD | NEW |