Make castv2 performance test work.
[chromium-blink-merge.git] / ui / views / bubble / bubble_window_targeter.cc
blob19e0c85f91ab682072a21b100ca8d25edb0f1860
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 "ui/views/bubble/bubble_window_targeter.h"
7 #include "ui/aura/window.h"
8 #include "ui/gfx/path.h"
9 #include "ui/gfx/skia_util.h"
10 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/bubble/bubble_frame_view.h"
13 namespace views {
15 BubbleWindowTargeter::BubbleWindowTargeter(BubbleDelegateView* bubble)
16 : wm::MaskedWindowTargeter(bubble->GetWidget()->GetNativeView()),
17 bubble_(bubble) {
20 BubbleWindowTargeter::~BubbleWindowTargeter() {
23 bool BubbleWindowTargeter::GetHitTestMask(aura::Window* window,
24 gfx::Path* mask) const {
25 mask->addRect(
26 gfx::RectToSkRect(bubble_->GetBubbleFrameView()->GetContentsBounds()));
27 return true;
30 } // namespace views