[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / apps / shaped_app_window_targeter.cc
blob8e3513adc611eeddbd7ac61b46a67ad6b2045964
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 return shape ? shape->getBoundaryPath(mask) : false;