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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 void Shell::DismissAppList() { | 333 void Shell::DismissAppList() { |
334 delegate_->GetAppListPresenter()->Dismiss(); | 334 delegate_->GetAppListPresenter()->Dismiss(); |
335 } | 335 } |
336 | 336 |
337 void Shell::ToggleAppList(aura::Window* window) { | 337 void Shell::ToggleAppList(aura::Window* window) { |
338 // If the context window is not given, show it on the target root window. | 338 // If the context window is not given, show it on the target root window. |
339 delegate_->GetAppListPresenter()->ToggleAppList( | 339 delegate_->GetAppListPresenter()->ToggleAppList( |
340 GetDisplayIdForWindow(window)); | 340 GetDisplayIdForWindow(window)); |
341 } | 341 } |
342 | 342 |
| 343 bool Shell::IsApplistVisible() const { |
| 344 return delegate_->GetAppListPresenter()->IsVisible(); |
| 345 } |
| 346 |
343 bool Shell::GetAppListTargetVisibility() const { | 347 bool Shell::GetAppListTargetVisibility() const { |
344 return delegate_->GetAppListPresenter()->GetTargetVisibility(); | 348 return delegate_->GetAppListPresenter()->GetTargetVisibility(); |
345 } | 349 } |
346 | 350 |
347 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( | 351 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( |
348 views::Widget* widget) { | 352 views::Widget* widget) { |
349 // Use translucent-style window frames for dialogs. | 353 // Use translucent-style window frames for dialogs. |
350 return new CustomFrameViewAsh(widget); | 354 return new CustomFrameViewAsh(widget); |
351 } | 355 } |
352 | 356 |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1220 |
1217 void Shell::OnWindowActivated( | 1221 void Shell::OnWindowActivated( |
1218 aura::client::ActivationChangeObserver::ActivationReason reason, | 1222 aura::client::ActivationChangeObserver::ActivationReason reason, |
1219 aura::Window* gained_active, | 1223 aura::Window* gained_active, |
1220 aura::Window* lost_active) { | 1224 aura::Window* lost_active) { |
1221 if (gained_active) | 1225 if (gained_active) |
1222 target_root_window_ = gained_active->GetRootWindow(); | 1226 target_root_window_ = gained_active->GetRootWindow(); |
1223 } | 1227 } |
1224 | 1228 |
1225 } // namespace ash | 1229 } // namespace ash |
OLD | NEW |