| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/shelf/shelf_widget.h" | 5 #include "ash/shelf/shelf_widget.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/focus_cycler.h" | 8 #include "ash/focus_cycler.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 | 611 |
| 612 // The shelf should not take focus when initially shown. | 612 // The shelf should not take focus when initially shown. |
| 613 set_focus_on_creation(false); | 613 set_focus_on_creation(false); |
| 614 SetContentsView(delegate_view_); | 614 SetContentsView(delegate_view_); |
| 615 delegate_view_->SetParentLayer(GetLayer()); | 615 delegate_view_->SetParentLayer(GetLayer()); |
| 616 | 616 |
| 617 shelf_layout_manager_ = new ShelfLayoutManager(this); | 617 shelf_layout_manager_ = new ShelfLayoutManager(this); |
| 618 shelf_layout_manager_->AddObserver(this); | 618 shelf_layout_manager_->AddObserver(this); |
| 619 shelf_container->SetLayoutManager(shelf_layout_manager_); | 619 shelf_container->SetLayoutManager(shelf_layout_manager_); |
| 620 shelf_layout_manager_->set_workspace_controller(workspace_controller); | 620 shelf_layout_manager_->set_workspace_controller(workspace_controller); |
| 621 workspace_controller->SetShelf(shelf_layout_manager_); | 621 workspace_controller->set_shelf(shelf_layout_manager_); |
| 622 | 622 |
| 623 status_area_widget_ = new StatusAreaWidget(status_container, this); | 623 status_area_widget_ = new StatusAreaWidget(status_container, this); |
| 624 status_area_widget_->CreateTrayViews(); | 624 status_area_widget_->CreateTrayViews(); |
| 625 if (Shell::GetInstance()->session_state_delegate()-> | 625 if (Shell::GetInstance()->session_state_delegate()-> |
| 626 IsActiveUserSessionStarted()) { | 626 IsActiveUserSessionStarted()) { |
| 627 status_area_widget_->Show(); | 627 status_area_widget_->Show(); |
| 628 } | 628 } |
| 629 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); | 629 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); |
| 630 | 630 |
| 631 status_container->SetLayoutManager( | 631 status_container->SetLayoutManager( |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 DCHECK(delegate_view_); | 826 DCHECK(delegate_view_); |
| 827 return delegate_view_->disable_dimming_animations_for_test(); | 827 return delegate_view_->disable_dimming_animations_for_test(); |
| 828 } | 828 } |
| 829 | 829 |
| 830 void ShelfWidget::WillDeleteShelf() { | 830 void ShelfWidget::WillDeleteShelf() { |
| 831 shelf_layout_manager_->RemoveObserver(this); | 831 shelf_layout_manager_->RemoveObserver(this); |
| 832 shelf_layout_manager_ = NULL; | 832 shelf_layout_manager_ = NULL; |
| 833 } | 833 } |
| 834 | 834 |
| 835 } // namespace ash | 835 } // namespace ash |
| OLD | NEW |