OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/bubble/bubble_delegate.h" | 5 #include "ui/views/bubble/bubble_delegate.h" |
6 | 6 |
7 #include "ui/base/animation/slide_animation.h" | 7 #include "ui/base/animation/slide_animation.h" |
8 #include "ui/gfx/color_utils.h" | 8 #include "ui/gfx/color_utils.h" |
9 #include "ui/views/bubble/bubble_frame_view.h" | 9 #include "ui/views/bubble/bubble_frame_view.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 gfx::Rect BubbleDelegateView::GetBubbleBounds() { | 344 gfx::Rect BubbleDelegateView::GetBubbleBounds() { |
345 // The argument rect has its origin at the bubble's arrow anchor point; | 345 // The argument rect has its origin at the bubble's arrow anchor point; |
346 // its size is the preferred size of the bubble's client view (this view). | 346 // its size is the preferred size of the bubble's client view (this view). |
347 return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(), | 347 return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(), |
348 GetPreferredSize(), adjust_if_offscreen_); | 348 GetPreferredSize(), adjust_if_offscreen_); |
349 } | 349 } |
350 | 350 |
351 #if defined(OS_WIN) && !defined(USE_AURA) | 351 #if defined(OS_WIN) && !defined(USE_AURA) |
352 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { | 352 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { |
353 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); | 353 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); |
354 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin()); | 354 client_bounds.Offset( |
| 355 border_widget_->GetWindowBoundsInScreen().OffsetFromOrigin()); |
355 return client_bounds; | 356 return client_bounds; |
356 } | 357 } |
357 #endif | 358 #endif |
358 | 359 |
359 } // namespace views | 360 } // namespace views |
OLD | NEW |