Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / apps / shaped_app_window_targeter.cc
blob6f0e7cdf642b63b0adc155c1d8671cb058595471
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
7 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
8 #include "ui/gfx/path.h"
10 ShapedAppWindowTargeter::ShapedAppWindowTargeter(
11 aura::Window* window,
12 ChromeNativeAppWindowViews* app_window)
13 : wm::MaskedWindowTargeter(window), app_window_(app_window) {}
15 ShapedAppWindowTargeter::~ShapedAppWindowTargeter() {
18 bool ShapedAppWindowTargeter::GetHitTestMask(aura::Window* window,
19 gfx::Path* mask) const {
20 SkRegion* shape = app_window_->shape();
21 if (!shape)
22 return false;
24 shape->getBoundaryPath(mask);
25 return true;