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