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

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

Issue 10900018: Introduce App Launcher for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 3 months 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 GetWidget()->Close(); 229 GetWidget()->Close();
230 } 230 }
231 231
232 void BubbleDelegateView::OnWidgetMoved(Widget* widget) { 232 void BubbleDelegateView::OnWidgetMoved(Widget* widget) {
233 if (move_with_anchor() && anchor_widget() == widget) 233 if (move_with_anchor() && anchor_widget() == widget)
234 SizeToContents(); 234 SizeToContents();
235 } 235 }
236 236
237 gfx::Rect BubbleDelegateView::GetAnchorRect() { 237 gfx::Rect BubbleDelegateView::GetAnchorRect() {
238 if (!anchor_view()) 238 if (!anchor_view())
239 return gfx::Rect(); 239 return gfx::Rect(anchor_point_, gfx::Size());
240 gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen(); 240 gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen();
241 anchor_bounds.Inset(anchor_insets_); 241 anchor_bounds.Inset(anchor_insets_);
242 return anchor_bounds; 242 return anchor_bounds;
243 } 243 }
244 244
245 void BubbleDelegateView::Show() { 245 void BubbleDelegateView::Show() {
246 GetWidget()->Show(); 246 GetWidget()->Show();
247 } 247 }
248 248
249 void BubbleDelegateView::StartFade(bool fade_in) { 249 void BubbleDelegateView::StartFade(bool fade_in) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 #if defined(OS_WIN) && !defined(USE_AURA) 347 #if defined(OS_WIN) && !defined(USE_AURA)
348 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { 348 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
349 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); 349 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
350 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin()); 350 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin());
351 return client_bounds; 351 return client_bounds;
352 } 352 }
353 #endif 353 #endif
354 354
355 } // namespace views 355 } // namespace views
OLDNEW
« ui/views/bubble/bubble_delegate.h ('K') | « ui/views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698