blob: 6f0e7cdf642b63b0adc155c1d8671cb058595471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// 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 "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
#include "ui/gfx/path.h"
ShapedAppWindowTargeter::ShapedAppWindowTargeter(
aura::Window* window,
ChromeNativeAppWindowViews* app_window)
: wm::MaskedWindowTargeter(window), app_window_(app_window) {}
ShapedAppWindowTargeter::~ShapedAppWindowTargeter() {
}
bool ShapedAppWindowTargeter::GetHitTestMask(aura::Window* window,
gfx::Path* mask) const {
SkRegion* shape = app_window_->shape();
if (!shape)
return false;
shape->getBoundaryPath(mask);
return true;
}
|