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/app_list/app_list.h" | 5 #include "ash/app_list/app_list.h" |
6 | 6 |
7 #include "ash/app_list/app_list_model.h" | 7 #include "ash/app_list/app_list_model.h" |
8 #include "ash/app_list/app_list_view.h" | 8 #include "ash/app_list/app_list_view.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 ui::Layer* GetLayer(views::Widget* widget) { | 40 ui::Layer* GetLayer(views::Widget* widget) { |
41 return widget->GetNativeView()->layer(); | 41 return widget->GetNativeView()->layer(); |
42 } | 42 } |
43 | 43 |
44 } // namespace | 44 } // namespace |
45 | 45 |
46 //////////////////////////////////////////////////////////////////////////////// | 46 //////////////////////////////////////////////////////////////////////////////// |
47 // AppList, public: | 47 // AppList, public: |
48 | 48 |
49 AppList::AppList() | 49 AppList::AppList() : is_visible_(false), widget_(NULL) { |
50 : aura::EventFilter(NULL), | |
51 is_visible_(false), | |
52 widget_(NULL) { | |
53 } | 50 } |
54 | 51 |
55 AppList::~AppList() { | 52 AppList::~AppList() { |
56 ResetWidget(); | 53 ResetWidget(); |
57 } | 54 } |
58 | 55 |
59 void AppList::SetVisible(bool visible) { | 56 void AppList::SetVisible(bool visible) { |
60 if (visible == is_visible_) | 57 if (visible == is_visible_) |
61 return; | 58 return; |
62 | 59 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 186 } |
190 | 187 |
191 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { | 188 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { |
192 DCHECK(widget_ == widget); | 189 DCHECK(widget_ == widget); |
193 if (widget_ && is_visible_ && !active) | 190 if (widget_ && is_visible_ && !active) |
194 SetVisible(false); | 191 SetVisible(false); |
195 } | 192 } |
196 | 193 |
197 } // namespace internal | 194 } // namespace internal |
198 } // namespace ash | 195 } // namespace ash |
OLD | NEW |