OLD | NEW |
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/system/tray/system_tray_bubble.h" | 5 #include "ash/system/tray/system_tray_bubble.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
11 #include "ash/system/tray/tray_bubble_wrapper.h" | 11 #include "ash/system/tray/tray_bubble_wrapper.h" |
12 #include "ash/system/tray/tray_constants.h" | 12 #include "ash/system/tray/tray_constants.h" |
13 #include "ash/system/tray/tray_popup_item_container.h" | 13 #include "ash/system/tray/tray_popup_item_container.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/thread_task_runner_handle.h" |
15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
16 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
17 #include "ui/compositor/layer_animation_observer.h" | 17 #include "ui/compositor/layer_animation_observer.h" |
18 #include "ui/compositor/scoped_layer_animation_settings.h" | 18 #include "ui/compositor/scoped_layer_animation_settings.h" |
19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
20 #include "ui/views/layout/box_layout.h" | 20 #include "ui/views/layout/box_layout.h" |
21 #include "ui/views/view.h" | 21 #include "ui/views/view.h" |
22 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
23 | 23 |
24 using views::TrayBubbleView; | 24 using views::TrayBubbleView; |
(...skipping 17 matching lines...) Expand all Loading... |
42 // the animation. | 42 // the animation. |
43 class AnimationObserverDeleteLayer : public ui::ImplicitAnimationObserver { | 43 class AnimationObserverDeleteLayer : public ui::ImplicitAnimationObserver { |
44 public: | 44 public: |
45 explicit AnimationObserverDeleteLayer(ui::Layer* layer) | 45 explicit AnimationObserverDeleteLayer(ui::Layer* layer) |
46 : layer_(layer) { | 46 : layer_(layer) { |
47 } | 47 } |
48 | 48 |
49 ~AnimationObserverDeleteLayer() override {} | 49 ~AnimationObserverDeleteLayer() override {} |
50 | 50 |
51 void OnImplicitAnimationsCompleted() override { | 51 void OnImplicitAnimationsCompleted() override { |
52 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, this); | 52 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
53 } | 53 } |
54 | 54 |
55 private: | 55 private: |
56 scoped_ptr<ui::Layer> layer_; | 56 scoped_ptr<ui::Layer> layer_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(AnimationObserverDeleteLayer); | 58 DISALLOW_COPY_AND_ASSIGN(AnimationObserverDeleteLayer); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // 2 items, which are the bottom header row and the one just above it. | 316 // 2 items, which are the bottom header row and the one just above it. |
317 bubble_view_->AddChildView(new TrayPopupItemContainer( | 317 bubble_view_->AddChildView(new TrayPopupItemContainer( |
318 item_views[i], is_default_bubble, | 318 item_views[i], is_default_bubble, |
319 is_default_bubble && (i < item_views.size() - 2))); | 319 is_default_bubble && (i < item_views.size() - 2))); |
320 } | 320 } |
321 if (focus_view) | 321 if (focus_view) |
322 focus_view->RequestFocus(); | 322 focus_view->RequestFocus(); |
323 } | 323 } |
324 | 324 |
325 } // namespace ash | 325 } // namespace ash |
OLD | NEW |