summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher_view.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 18:22:51 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 18:22:51 +0000
commit194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656 (patch)
tree8b71cea824e13b6fca3734642fdf83e56c7d47f7 /ash/launcher/launcher_view.h
parent783eb300ba843d498bfb55076d81d45e77bb6fff (diff)
downloadchromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.zip
chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.gz
chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.bz2
Tweaks for the launcher:
. App list and browser shortcut buttons can be moved around. . Clicking the tabbed button cycles windows (creating a new one if there isn't one). BUG=110094 TEST=see bug R=ben@chromium.org,jamescook@chromium.org Review URL: http://codereview.chromium.org/9231030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher/launcher_view.h')
-rw-r--r--ash/launcher/launcher_view.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/ash/launcher/launcher_view.h b/ash/launcher/launcher_view.h
index 78b502bc..8d0db48 100644
--- a/ash/launcher/launcher_view.h
+++ b/ash/launcher/launcher_view.h
@@ -23,6 +23,7 @@ namespace ash {
struct LauncherItem;
class LauncherModel;
+class LauncherWindowCycler;
class ViewModel;
namespace internal {
@@ -42,8 +43,6 @@ class LauncherView : public views::WidgetDelegateView,
class StartFadeAnimationDelegate;
struct IdealBounds {
- gfx::Rect new_browser_bounds;
- gfx::Rect show_apps_bounds;
gfx::Rect overflow_bounds;
};
@@ -51,8 +50,7 @@ class LauncherView : public views::WidgetDelegateView,
void LayoutToIdealBounds();
// Calculates the ideal bounds. The bounds of each button corresponding to an
- // item in the model is set in |view_model_|, the bounds of the
- // |new_browser_button_| and |show_apps_button_| is set in |bounds|.
+ // item in the model is set in |view_model_|.
void CalculateIdealBounds(IdealBounds* bounds);
// Returns the index of the last view whose max x-coordinate is less than
@@ -87,6 +85,10 @@ class LauncherView : public views::WidgetDelegateView,
// Shows the overflow menu.
void ShowOverflowMenu();
+ // If |view| represents TYPE_BROWSER_SHORTCUT Reset() is invoked on the
+ // LauncherWindowCycler.
+ void MaybeResetWindowCycler(views::View* view);
+
// Overridden from views::View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
@@ -105,6 +107,7 @@ class LauncherView : public views::WidgetDelegateView,
const views::MouseEvent& event) OVERRIDE;
virtual void MouseReleasedOnButton(views::View* view,
bool canceled) OVERRIDE;
+ virtual void MouseExitedButton(views::View* view) OVERRIDE;
// Overriden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
@@ -119,10 +122,6 @@ class LauncherView : public views::WidgetDelegateView,
scoped_ptr<views::BoundsAnimator> bounds_animator_;
- views::ImageButton* new_browser_button_;
-
- views::ImageButton* show_apps_button_;
-
views::ImageButton* overflow_button_;
// Are we dragging? This is only set if the mouse is dragged far enough to
@@ -141,6 +140,9 @@ class LauncherView : public views::WidgetDelegateView,
scoped_ptr<views::MenuRunner> overflow_menu_runner_;
+ // Used to handle cycling among windows.
+ scoped_ptr<LauncherWindowCycler> cycler_;
+
DISALLOW_COPY_AND_ASSIGN(LauncherView);
};