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

Side by Side Diff: ash/launcher/overflow_bubble.cc

Issue 11341034: Animation changed to fade out on Launcher related bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « no previous file | ash/system/tray/tray_background_view.cc » ('j') | 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 "ash/launcher/overflow_bubble.h" 5 #include "ash/launcher/overflow_bubble.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_types.h" 9 #include "ash/launcher/launcher_types.h"
10 #include "ash/launcher/launcher_view.h" 10 #include "ash/launcher/launcher_view.h"
11 #include "ash/system/tray/system_tray.h"
11 #include "ash/shell.h" 12 #include "ash/shell.h"
12 #include "ui/gfx/insets.h" 13 #include "ui/gfx/insets.h"
13 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
14 #include "ui/views/bubble/bubble_delegate.h" 15 #include "ui/views/bubble/bubble_delegate.h"
15 #include "ui/views/bubble/bubble_frame_view.h" 16 #include "ui/views/bubble/bubble_frame_view.h"
16 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
17 18
18 namespace ash { 19 namespace ash {
19 namespace internal { 20 namespace internal {
20 21
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 Hide(); 261 Hide();
261 262
262 OverflowBubbleView* bubble_view = new OverflowBubbleView(); 263 OverflowBubbleView* bubble_view = new OverflowBubbleView();
263 bubble_view->InitOverflowBubble(delegate, 264 bubble_view->InitOverflowBubble(delegate,
264 model, 265 model,
265 anchor, 266 anchor,
266 shelf_alignment, 267 shelf_alignment,
267 overflow_start_index); 268 overflow_start_index);
268 269
269 bubble_ = bubble_view; 270 bubble_ = bubble_view;
271 ash::Shell::GetInstance()->system_tray()->InitializeBubbleAnimations(
272 bubble_->GetWidget());
270 bubble_->GetWidget()->AddObserver(this); 273 bubble_->GetWidget()->AddObserver(this);
271 bubble_->GetWidget()->Show(); 274 bubble_->GetWidget()->Show();
272 } 275 }
273 276
274 void OverflowBubble::Hide() { 277 void OverflowBubble::Hide() {
275 if (!IsShowing()) 278 if (!IsShowing())
276 return; 279 return;
277 280
278 bubble_->GetWidget()->RemoveObserver(this); 281 bubble_->GetWidget()->RemoveObserver(this);
279 bubble_->GetWidget()->Close(); 282 bubble_->GetWidget()->Close();
280 bubble_ = NULL; 283 bubble_ = NULL;
281 } 284 }
282 285
283 void OverflowBubble::OnWidgetClosing(views::Widget* widget) { 286 void OverflowBubble::OnWidgetClosing(views::Widget* widget) {
284 DCHECK(widget == bubble_->GetWidget()); 287 DCHECK(widget == bubble_->GetWidget());
285 bubble_ = NULL; 288 bubble_ = NULL;
286 } 289 }
287 290
288 } // namespace internal 291 } // namespace internal
289 } // namespace ash 292 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698