Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ui/views/bubble/bubble_delegate.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698