| OLD | NEW |
| (Empty) |
| 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 "ui/views/bubble/bubble_window_targeter.h" | |
| 6 | |
| 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" | |
| 12 | |
| 13 namespace views { | |
| 14 | |
| 15 BubbleWindowTargeter::BubbleWindowTargeter(BubbleDelegateView* bubble) | |
| 16 : wm::MaskedWindowTargeter(bubble->GetWidget()->GetNativeView()), | |
| 17 bubble_(bubble) { | |
| 18 } | |
| 19 | |
| 20 BubbleWindowTargeter::~BubbleWindowTargeter() { | |
| 21 } | |
| 22 | |
| 23 bool BubbleWindowTargeter::GetHitTestMask(aura::Window* window, | |
| 24 gfx::Path* mask) const { | |
| 25 mask->addRect( | |
| 26 gfx::RectToSkRect(bubble_->GetBubbleFrameView()->GetContentsBounds())); | |
| 27 return true; | |
| 28 } | |
| 29 | |
| 30 } // namespace views | |
| OLD | NEW |