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

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: Rebase gyp file for ui extraction 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
« no previous file with comments | « ui/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) 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 GetWidget()->Close(); 238 GetWidget()->Close();
239 } 239 }
240 240
241 void BubbleDelegateView::OnWidgetMoved(Widget* widget) { 241 void BubbleDelegateView::OnWidgetMoved(Widget* widget) {
242 if (move_with_anchor() && anchor_widget() == widget) 242 if (move_with_anchor() && anchor_widget() == widget)
243 SizeToContents(); 243 SizeToContents();
244 } 244 }
245 245
246 gfx::Rect BubbleDelegateView::GetAnchorRect() { 246 gfx::Rect BubbleDelegateView::GetAnchorRect() {
247 if (!anchor_view()) 247 if (!anchor_view())
248 return gfx::Rect(); 248 return gfx::Rect(anchor_point_, gfx::Size());
249 gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen(); 249 gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen();
250 anchor_bounds.Inset(anchor_insets_); 250 anchor_bounds.Inset(anchor_insets_);
251 return anchor_bounds; 251 return anchor_bounds;
252 } 252 }
253 253
254 void BubbleDelegateView::Show() { 254 void BubbleDelegateView::Show() {
255 GetWidget()->Show(); 255 GetWidget()->Show();
256 } 256 }
257 257
258 void BubbleDelegateView::StartFade(bool fade_in) { 258 void BubbleDelegateView::StartFade(bool fade_in) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 #if defined(OS_WIN) && !defined(USE_AURA) 356 #if defined(OS_WIN) && !defined(USE_AURA)
357 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { 357 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
358 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); 358 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
359 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin()); 359 client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin());
360 return client_bounds; 360 return client_bounds;
361 } 361 }
362 #endif 362 #endif
363 363
364 } // namespace views 364 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698