diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/ash/shelf/overflow_bubble.h | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) | |
download | qtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/ash/shelf/overflow_bubble.h')
-rw-r--r-- | chromium/ash/shelf/overflow_bubble.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/chromium/ash/shelf/overflow_bubble.h b/chromium/ash/shelf/overflow_bubble.h new file mode 100644 index 00000000000..26bdf7a855e --- /dev/null +++ b/chromium/ash/shelf/overflow_bubble.h @@ -0,0 +1,69 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_SHELF_OVERFLOW_BUBBLE_H_ +#define ASH_SHELF_OVERFLOW_BUBBLE_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "ui/events/event_handler.h" +#include "ui/views/widget/widget_observer.h" + +namespace ui { +class LocatedEvent; +} + +namespace views { +class View; +} + +namespace ash { + +namespace internal { + +class OverflowBubbleView; +class ShelfLayoutManager; +class ShelfView; + +// OverflowBubble displays the overflown launcher items in a bubble. +class OverflowBubble : public ui::EventHandler, + public views::WidgetObserver { + public: + OverflowBubble(); + virtual ~OverflowBubble(); + + // Shows an bubble pointing to |anchor| with |shelf_view| as its content. + void Show(views::View* anchor, ShelfView* shelf_view); + + void Hide(); + + // This method as name indicates will hide bubble and schedule paint + // for overflow button. + void HideBubbleAndRefreshButton(); + + bool IsShowing() const { return !!bubble_; } + ShelfView* shelf_view() { return shelf_view_; } + OverflowBubbleView* bubble_view() { return bubble_; } + + private: + void ProcessPressedEvent(ui::LocatedEvent* event); + + // Overridden from ui::EventHandler: + virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; + virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; + + // Overridden from views::WidgetObserver: + virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; + + OverflowBubbleView* bubble_; // Owned by views hierarchy. + views::View* anchor_; // Owned by ShelfView. + ShelfView* shelf_view_; // Owned by |bubble_|. + + DISALLOW_COPY_AND_ASSIGN(OverflowBubble); +}; + +} // namespace internal +} // namespace ash + +#endif // ASH_SHELF_OVERFLOW_BUBBLE_H_ |