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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 gfx::Rect BubbleDelegateView::GetBubbleBounds() { | 347 gfx::Rect BubbleDelegateView::GetBubbleBounds() { |
348 // The argument rect has its origin at the bubble's arrow anchor point; | 348 // The argument rect has its origin at the bubble's arrow anchor point; |
349 // its size is the preferred size of the bubble's client view (this view). | 349 // its size is the preferred size of the bubble's client view (this view). |
350 return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(), | 350 return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(), |
351 GetPreferredSize(), adjust_if_offscreen_); | 351 GetPreferredSize(), adjust_if_offscreen_); |
352 } | 352 } |
353 | 353 |
354 #if defined(OS_WIN) && !defined(USE_AURA) | 354 #if defined(OS_WIN) && !defined(USE_AURA) |
355 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { | 355 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { |
356 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); | 356 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); |
357 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin()); | 357 client_bounds.Offset( |
| 358 border_widget_->GetWindowBoundsInScreen().DistanceFromOrigin()); |
358 return client_bounds; | 359 return client_bounds; |
359 } | 360 } |
360 #endif | 361 #endif |
361 | 362 |
362 } // namespace views | 363 } // namespace views |
OLD | NEW |