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

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: build 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« ui/gfx/vector2d_f.h ('K') | « ui/ui.gyp ('k') | ui/views/button_drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698