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

Unified Diff: ui/wm/core/masked_window_targeter.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. 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
« no previous file with comments | « ui/wm/core/masked_window_targeter.h ('k') | ui/wm/core/native_cursor_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/masked_window_targeter.cc
diff --git a/ui/wm/core/masked_window_targeter.cc b/ui/wm/core/masked_window_targeter.cc
deleted file mode 100644
index 5cbdb1993b16b91adb5936500658f98b40d4fbd6..0000000000000000000000000000000000000000
--- a/ui/wm/core/masked_window_targeter.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 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 "ui/wm/core/masked_window_targeter.h"
-
-#include "ui/aura/window.h"
-#include "ui/gfx/path.h"
-
-namespace wm {
-
-MaskedWindowTargeter::MaskedWindowTargeter(aura::Window* masked_window)
- : masked_window_(masked_window) {
-}
-
-MaskedWindowTargeter::~MaskedWindowTargeter() {}
-
-bool MaskedWindowTargeter::EventLocationInsideBounds(
- ui::EventTarget* target,
- const ui::LocatedEvent& event) const {
- aura::Window* window = static_cast<aura::Window*>(target);
- if (window == masked_window_) {
- gfx::Path mask;
- if (!GetHitTestMask(window, &mask))
- return WindowTargeter::EventLocationInsideBounds(window, event);
-
- gfx::Size size = window->bounds().size();
- SkRegion clip_region;
- clip_region.setRect(0, 0, size.width(), size.height());
-
- gfx::Point point = event.location();
- if (window->parent())
- aura::Window::ConvertPointToTarget(window->parent(), window, &point);
-
- SkRegion mask_region;
- return mask_region.setPath(mask, clip_region) &&
- mask_region.contains(point.x(), point.y());
- }
-
- return WindowTargeter::EventLocationInsideBounds(window, event);
-}
-
-} // namespace wm
« no previous file with comments | « ui/wm/core/masked_window_targeter.h ('k') | ui/wm/core/native_cursor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698