diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 21:43:37 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 21:43:37 +0000 |
commit | 53520b1be02b63bee20fd48b000cd9a7850f9e6e (patch) | |
tree | 83b1616fa1710401a2b08438c3381666a3b0ee9a /ash/launcher | |
parent | f08e0c7847e42b5560386a80ae9b9729b1d497c3 (diff) | |
download | chromium_src-53520b1be02b63bee20fd48b000cd9a7850f9e6e.zip chromium_src-53520b1be02b63bee20fd48b000cd9a7850f9e6e.tar.gz chromium_src-53520b1be02b63bee20fd48b000cd9a7850f9e6e.tar.bz2 |
ash: First pass of Applist v2.
- Add an "enable-applist-v2" command line switch and an about flag to trigger v2;
- Add paging support to AppListModelView;
- Add page switcher buttons for v2 UI;
- Add AppListBubbleBorder to paint bubble for v2 UI;
BUG=125964, 125044
TEST=Issue 125964 is not ready for test yet. For issue 125044, user can now gets overflown apps via keyboard.
Review URL: https://chromiumcodereview.appspot.com/10381018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r-- | ash/launcher/launcher.cc | 4 | ||||
-rw-r--r-- | ash/launcher/launcher.h | 5 | ||||
-rw-r--r-- | ash/launcher/launcher_view.cc | 10 | ||||
-rw-r--r-- | ash/launcher/launcher_view.h | 2 |
4 files changed, 20 insertions, 1 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc index 4ee1205..f97c190 100644 --- a/ash/launcher/launcher.cc +++ b/ash/launcher/launcher.cc @@ -198,6 +198,10 @@ bool Launcher::IsShowingMenu() const { return launcher_view_->IsShowingMenu(); } +views::View* Launcher::GetAppListButtonView() const { + return launcher_view_->GetAppListButtonView(); +} + internal::LauncherView* Launcher::GetLauncherViewForTest() { return launcher_view_; } diff --git a/ash/launcher/launcher.h b/ash/launcher/launcher.h index 7955b07..e244d4c 100644 --- a/ash/launcher/launcher.h +++ b/ash/launcher/launcher.h @@ -6,10 +6,10 @@ #define ASH_LAUNCHER_LAUNCHER_H_ #pragma once +#include "ash/ash_export.h" #include "ash/launcher/background_animator.h" #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "ash/ash_export.h" namespace aura { class Window; @@ -20,6 +20,7 @@ class Rect; } namespace views { +class View; class Widget; } @@ -63,6 +64,8 @@ class ASH_EXPORT Launcher : public internal::BackgroundAnimatorDelegate { // Returns true if the Launcher is showing a context menu. bool IsShowingMenu() const; + views::View* GetAppListButtonView() const; + // Only to be called for testing. Retrieves the LauncherView. // TODO(sky): remove this! internal::LauncherView* GetLauncherViewForTest(); diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc index d254203..2f2ba3f 100644 --- a/ash/launcher/launcher_view.cc +++ b/ash/launcher/launcher_view.cc @@ -317,6 +317,16 @@ bool LauncherView::IsShowingMenu() const { return false; } +views::View* LauncherView::GetAppListButtonView() const { + for (int i = 0; i < model_->item_count(); ++i) { + if (model_->items()[i].type == TYPE_APP_LIST) + return view_model_->view_at(i); + } + + NOTREACHED() << "Applist button not found"; + return NULL; +} + //////////////////////////////////////////////////////////////////////////////// // LauncherView, FocusTraversable implementation: diff --git a/ash/launcher/launcher_view.h b/ash/launcher/launcher_view.h index fef3920..64b241d 100644 --- a/ash/launcher/launcher_view.h +++ b/ash/launcher/launcher_view.h @@ -61,6 +61,8 @@ class ASH_EXPORT LauncherView : public views::View, // Returns true if we're showing a menu. bool IsShowingMenu() const; + views::View* GetAppListButtonView() const; + // Overridden from FocusTraversable: virtual views::FocusSearch* GetFocusSearch() OVERRIDE; virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE; |