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

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

Issue 23654037: Add panels as a single group of windows per display for overview window cycling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
Index: ash/wm/overview/window_selector_window.h
diff --git a/ash/wm/overview/window_selector_window.h b/ash/wm/overview/window_selector_window.h
index 050ac9374246eee1038a7518d16515d056f4dfd3..1c0042b6cabf21ce31dd6a39d436213d58f930bb 100644
--- a/ash/wm/overview/window_selector_window.h
+++ b/ash/wm/overview/window_selector_window.h
@@ -5,76 +5,38 @@
#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
+#include "ash/wm/overview/scoped_transform_overview_window.h"
+#include "ash/wm/overview/window_selector_item.h"
#include "base/compiler_specific.h"
#include "ui/gfx/rect.h"
-#include "ui/gfx/transform.h"
namespace aura {
class RootWindow;
class Window;
}
-namespace ui {
-class Layer;
-}
-
-namespace views {
-class Widget;
-}
-
namespace ash {
-// Manages a window in the overview mode. This class transitions the window
-// to the best fit within the available overview rectangle, copying it if the
-// window is sent to another display and restores the window state on
-// deletion.
-class WindowSelectorWindow {
+// This implements a window overview item with a single window which can be
+// selected.
+class WindowSelectorWindow : public WindowSelectorItem {
public:
- explicit WindowSelectorWindow(aura::Window* window);
+ WindowSelectorWindow(aura::Window* window);
virtual ~WindowSelectorWindow();
- aura::Window* window() { return window_; }
- const aura::Window* window() const { return window_; }
-
- // Returns true if this window selector window contains the |target|. This is
- // used to determine if an event targetted this window.
- bool Contains(const aura::Window* target) const;
-
- // Restores this window on exit rather than returning it to a minimized state
- // if it was minimized on entering overview mode.
- void RestoreWindowOnExit();
-
- // Informs the WindowSelectorWindow that the window being watched was
- // destroyed. This resets the internal window pointer to avoid calling
- // anything on the window at destruction time.
- void OnWindowDestroyed();
-
- // Applies a transform to the window to fit within |target_bounds| while
- // maintaining its aspect ratio.
- void TransformToFitBounds(aura::RootWindow* root_window,
- const gfx::Rect& target_bounds);
-
- const gfx::Rect& bounds() { return fit_bounds_; }
+ // WindowSelectorItem:
+ virtual const aura::RootWindow* GetRootWindow() const OVERRIDE;
+ virtual aura::Window* TargetedWindow(
+ const aura::Window* target) const OVERRIDE;
+ virtual void RestoreWindowOnExit(aura::Window* window) OVERRIDE;
+ virtual aura::Window* SelectionWindow() const OVERRIDE;
+ virtual void RemoveWindow(const aura::Window* window) OVERRIDE;
+ virtual bool empty() const OVERRIDE;
+ virtual void SetBounds(aura::RootWindow* root_window,
+ const gfx::Rect& target_bounds) OVERRIDE;
private:
- // A weak pointer to the real window in the overview.
- aura::Window* window_;
-
- // A copy of the window used to transition the window to another root.
- views::Widget* window_copy_;
-
- // A weak pointer to a deep copy of the window's layers.
- ui::Layer* layer_;
-
- // If true, the window was minimized and should be restored if the window
- // was not selected.
- bool minimized_;
-
- // The original transform of the window before entering overview mode.
- gfx::Transform original_transform_;
-
- // The bounds this window is fit to.
- gfx::Rect fit_bounds_;
+ ScopedTransformOverviewWindow transform_window_;
DISALLOW_COPY_AND_ASSIGN(WindowSelectorWindow);
};

Powered by Google App Engine
This is Rietveld 408576698