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

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

Issue 8387020: Make GetAnchorPoint non const. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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
« no previous file with comments | « views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/bubble/bubble_delegate.h" 5 #include "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 "views/bubble/bubble_frame_view.h" 8 #include "views/bubble/bubble_frame_view.h"
9 #include "views/widget/widget.h" 9 #include "views/widget/widget.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ClientView* BubbleDelegateView::CreateClientView(Widget* widget) { 62 ClientView* BubbleDelegateView::CreateClientView(Widget* widget) {
63 return new ClientView(widget, GetContentsView()); 63 return new ClientView(widget, GetContentsView());
64 } 64 }
65 65
66 NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView() { 66 NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView() {
67 return new BubbleFrameView(GetArrowLocation(), 67 return new BubbleFrameView(GetArrowLocation(),
68 GetPreferredSize(), 68 GetPreferredSize(),
69 GetColor()); 69 GetColor());
70 } 70 }
71 71
72 gfx::Point BubbleDelegateView::GetAnchorPoint() const { 72 gfx::Point BubbleDelegateView::GetAnchorPoint() {
73 return anchor_point_; 73 return anchor_point_;
74 } 74 }
75 75
76 BubbleBorder::ArrowLocation BubbleDelegateView::GetArrowLocation() const { 76 BubbleBorder::ArrowLocation BubbleDelegateView::GetArrowLocation() const {
77 return arrow_location_; 77 return arrow_location_;
78 } 78 }
79 79
80 SkColor BubbleDelegateView::GetColor() const { 80 SkColor BubbleDelegateView::GetColor() const {
81 return color_; 81 return color_;
82 } 82 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 gfx::Rect BubbleDelegateView::GetBubbleBounds() { 132 gfx::Rect BubbleDelegateView::GetBubbleBounds() {
133 // The argument rect has its origin at the bubble's arrow anchor point; 133 // The argument rect has its origin at the bubble's arrow anchor point;
134 // its size is the preferred size of the bubble's client view (this view). 134 // its size is the preferred size of the bubble's client view (this view).
135 return GetBubbleFrameView()->GetWindowBoundsForClientBounds( 135 return GetBubbleFrameView()->GetWindowBoundsForClientBounds(
136 gfx::Rect(GetAnchorPoint(), GetPreferredSize())); 136 gfx::Rect(GetAnchorPoint(), GetPreferredSize()));
137 } 137 }
138 138
139 } // namespace views 139 } // namespace views
OLDNEW
« no previous file with comments | « views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698