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

Unified Diff: ash/wm/overview/window_selector_item.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: Fix restored panel relayout when some panels minimized. 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
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/overview/window_selector_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_item.h
diff --git a/ash/wm/overview/window_selector_item.h b/ash/wm/overview/window_selector_item.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e29a59a9c73177ca20e08278e3078a3431fea0f
--- /dev/null
+++ b/ash/wm/overview/window_selector_item.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_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
+#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
+
+#include "base/compiler_specific.h"
+#include "ui/gfx/rect.h"
+
+namespace aura {
+class RootWindow;
+class Window;
+}
+
+namespace ash {
+
+// This class represents an item in overview mode. An item can have one or more
+// windows, of which only one can be activated by keyboard (i.e. alt+tab) but
+// any can be selected with a pointer (touch or mouse).
+class WindowSelectorItem {
+ public:
+ WindowSelectorItem();
+ virtual ~WindowSelectorItem();
+
+ // Returns the root window on which this item is shown.
+ virtual const aura::RootWindow* GetRootWindow() const = 0;
+
+ // Returns the targeted window given the event |target| window.
+ // Returns NULL if no Window in this item was selected.
+ virtual aura::Window* TargetedWindow(const aura::Window* target) const = 0;
+
+ // Restores |window| on exiting window overview rather than returning it
+ // to its previous state.
+ virtual void RestoreWindowOnExit(aura::Window* window) = 0;
+
+ // Returns the |window| to activate on selecting of this item.
+ virtual aura::Window* SelectionWindow() const = 0;
+
+ // Removes |window| from this item. Check empty() after calling this to see
+ // if the entire item is now empty.
+ virtual void RemoveWindow(const aura::Window* window) = 0;
+
+ // Returns true if this item has no more selectable windows (i.e. after
+ // calling RemoveWindow for the last contained window).
+ virtual bool empty() const = 0;
+
+ // Sets the bounds of this window selector item to |target_bounds| in the
+ // |root_window| root window.
+ void SetBounds(aura::RootWindow* root_window,
+ const gfx::Rect& target_bounds);
+
+ // Returns the current bounds of this selector item.
+ const gfx::Rect& bounds() { return bounds_; }
+
+ protected:
+ virtual void SetItemBounds(aura::RootWindow* root_window,
+ const gfx::Rect& target_bounds) = 0;
+
+ private:
+ // The bounds this item is fit to.
+ gfx::Rect bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/overview/window_selector_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698