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

Unified Diff: ash/wm/overview/overview_window_targeter.cc

Issue 810033010: Remove TransparentActivateWindowButton from Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented changes suggested by flackr 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/overview_window_targeter.cc
diff --git a/ash/wm/overview/overview_window_targeter.cc b/ash/wm/overview/overview_window_targeter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0fa04ce8d65374220dd6608a2f5ba547552b4b4c
--- /dev/null
+++ b/ash/wm/overview/overview_window_targeter.cc
@@ -0,0 +1,32 @@
+// Copyright 2015 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.
+
+#include "ash/wm/overview/overview_window_targeter.h"
+#include "ui/aura/window.h"
+
+namespace ash {
+
+OverviewWindowTargeter::OverviewWindowTargeter(aura::Window* target)
+ : bounds_(gfx::Rect()), target_(target) {
+}
+
+OverviewWindowTargeter::~OverviewWindowTargeter() {
+}
+
+ui::EventTarget* OverviewWindowTargeter::FindTargetForLocatedEvent(
+ ui::EventTarget* target,
+ ui::LocatedEvent* event) {
+ // Manually override the location of the event to make sure it targets the
+ // contents view on the target window.
+ event->set_location(gfx::PointF(0, 0));
+ return target_;
+}
+
+bool OverviewWindowTargeter::EventLocationInsideBounds(
+ ui::EventTarget* target,
+ const ui::LocatedEvent& event) const {
+ return bounds_.Contains(event.location());
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698