OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/home/public/home_card.h" | 5 #include "athena/home/public/home_card.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "athena/home/app_list_view_delegate.h" | 9 #include "athena/home/app_list_view_delegate.h" |
10 #include "athena/home/bottom_home_view.h" | 10 #include "athena/home/bottom_home_view.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 SetState(VISIBLE_BOTTOM); | 232 SetState(VISIBLE_BOTTOM); |
233 } | 233 } |
234 | 234 |
235 virtual void OnOverviewModeExit() OVERRIDE { | 235 virtual void OnOverviewModeExit() OVERRIDE { |
236 SetState(VISIBLE_MINIMIZED); | 236 SetState(VISIBLE_MINIMIZED); |
237 } | 237 } |
238 | 238 |
239 // aura::client::ActivationChangeObserver: | 239 // aura::client::ActivationChangeObserver: |
240 virtual void OnWindowActivated(aura::Window* gained_active, | 240 virtual void OnWindowActivated(aura::Window* gained_active, |
241 aura::Window* lost_active) OVERRIDE { | 241 aura::Window* lost_active) OVERRIDE { |
242 if (gained_active != home_card_widget_->GetNativeWindow()) | 242 if (state_ != HIDDEN && |
| 243 gained_active != home_card_widget_->GetNativeWindow()) { |
243 SetState(VISIBLE_MINIMIZED); | 244 SetState(VISIBLE_MINIMIZED); |
| 245 } |
244 } | 246 } |
245 | 247 |
246 scoped_ptr<AppModelBuilder> model_builder_; | 248 scoped_ptr<AppModelBuilder> model_builder_; |
247 | 249 |
248 HomeCard::State state_; | 250 HomeCard::State state_; |
249 | 251 |
250 // original_state_ is the state which the home card should go back to after | 252 // original_state_ is the state which the home card should go back to after |
251 // the virtual keyboard is hidden. | 253 // the virtual keyboard is hidden. |
252 HomeCard::State original_state_; | 254 HomeCard::State original_state_; |
253 | 255 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 instance = NULL; | 386 instance = NULL; |
385 } | 387 } |
386 | 388 |
387 // static | 389 // static |
388 HomeCard* HomeCard::Get() { | 390 HomeCard* HomeCard::Get() { |
389 DCHECK(instance); | 391 DCHECK(instance); |
390 return instance; | 392 return instance; |
391 } | 393 } |
392 | 394 |
393 } // namespace athena | 395 } // namespace athena |
OLD | NEW |