Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: ash/wm/overview/window_overview.h

Issue 256413004: Relayout windows in overview when display size changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge and remove extra newline. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/overview/window_overview.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_overview.h
diff --git a/ash/wm/overview/window_overview.h b/ash/wm/overview/window_overview.h
index 5c771818e2037d9903ea6b5b74d1397a51e84651..502e3d921e886dbc3e453750ac7948f3a5966cac 100644
--- a/ash/wm/overview/window_overview.h
+++ b/ash/wm/overview/window_overview.h
@@ -11,6 +11,7 @@
#include "base/time/time.h"
#include "ui/aura/window_tracker.h"
#include "ui/events/event_handler.h"
+#include "ui/gfx/display_observer.h"
#include "ui/gfx/rect.h"
namespace aura {
@@ -36,7 +37,8 @@ class WindowSelectorItem;
// The WindowOverview shows a grid of all of your windows and allows selecting
// a window by clicking or tapping on it. It also displays a selection widget
// used to indicate the current selection when alt-tabbing between windows.
-class WindowOverview : public ui::EventHandler {
+class WindowOverview : public ui::EventHandler,
+ public gfx::DisplayObserver {
public:
typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList;
@@ -64,6 +66,11 @@ class WindowOverview : public ui::EventHandler {
virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
+ // gfx::DisplayObserver:
+ virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
+ virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
+ virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
+
private:
// Returns the target of |event| or NULL if the event is not targeted at
// any of the windows in the selector.
@@ -77,12 +84,13 @@ class WindowOverview : public ui::EventHandler {
void HideAndTrackNonOverviewWindows();
// Position all of the windows based on the current selection mode.
- void PositionWindows();
+ void PositionWindows(bool animate);
// Position all of the windows from |root_window| on |root_window|.
- void PositionWindowsFromRoot(aura::Window* root_window);
+ void PositionWindowsFromRoot(aura::Window* root_window, bool animate);
// Position all of the |windows| to fit on the |root_window|.
void PositionWindowsOnRoot(aura::Window* root_window,
- const std::vector<WindowSelectorItem*>& windows);
+ const std::vector<WindowSelectorItem*>& windows,
+ bool animate);
// Creates the selection widget.
void InitializeSelectionWidget();
« no previous file with comments | « no previous file | ash/wm/overview/window_overview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698