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

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

Issue 810033010: Remove TransparentActivateWindowButton from Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_grid.h
diff --git a/ash/wm/overview/window_grid.h b/ash/wm/overview/window_grid.h
index 349c36675aa69d6195ce0f3e6d83dd25278b6e34..763136f95f0f645d457e171ee716d5e0f08527d4 100644
--- a/ash/wm/overview/window_grid.h
+++ b/ash/wm/overview/window_grid.h
@@ -15,6 +15,7 @@
namespace aura {
class Window;
+class ScopedWindowTargeter;
}
namespace views {
@@ -45,7 +46,8 @@ class WindowSelectorItem;
// 0, 3, 6, 1, 4, 2, 5
// The selector is switched to the next window grid (if available) or wrapped if
// it reaches the end of its movement sequence.
-class ASH_EXPORT WindowGrid : public aura::WindowObserver {
+class ASH_EXPORT WindowGrid : public aura::WindowObserver,
+ public ui::EventHandler {
public:
WindowGrid(aura::Window* root_window,
const std::vector<aura::Window*>& window_list,
@@ -100,6 +102,11 @@ class ASH_EXPORT WindowGrid : public aura::WindowObserver {
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override;
+ // ui::EventHandler:
+ void OnMouseEvent(ui::MouseEvent* mouse) override;
+
+ void OnGestureEvent(ui::GestureEvent* gesture) override;
+
private:
friend class WindowSelectorTest;
@@ -112,6 +119,13 @@ class ASH_EXPORT WindowGrid : public aura::WindowObserver {
bool out_of_bounds,
bool animate);
+ // Handles taps and clicks.
+ void HandleTap(ui::LocatedEvent* event) const;
+
+ // Returns the window at which the event is located.
+ aura::Window* GetWindowAt(ui::LocatedEvent* event,
+ aura::Window* container) const;
+
// Moves the selection widget to the targeted window.
void MoveSelectionWidgetToTarget(bool animate);
@@ -139,6 +153,12 @@ class ASH_EXPORT WindowGrid : public aura::WindowObserver {
// Number of columns in the grid.
size_t num_columns_;
+ // The container where the static targeter is set.
+ aura::Window* static_targeter_container_;
+
+ // Holds and restores the panel container's targeter.
+ scoped_ptr<aura::ScopedWindowTargeter> scoped_panel_targeter_;
+
DISALLOW_COPY_AND_ASSIGN(WindowGrid);
};

Powered by Google App Engine
This is Rietveld 408576698