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/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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 status_area_widget_->Show(); | 623 status_area_widget_->Show(); |
624 } | 624 } |
625 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); | 625 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); |
626 | 626 |
627 shelf_layout_manager_ = new ShelfLayoutManager(this); | 627 shelf_layout_manager_ = new ShelfLayoutManager(this); |
628 shelf_layout_manager_->AddObserver(this); | 628 shelf_layout_manager_->AddObserver(this); |
629 shelf_container->SetLayoutManager(shelf_layout_manager_); | 629 shelf_container->SetLayoutManager(shelf_layout_manager_); |
630 shelf_layout_manager_->set_workspace_controller(workspace_controller); | 630 shelf_layout_manager_->set_workspace_controller(workspace_controller); |
631 workspace_controller->SetShelf(shelf_layout_manager_); | 631 workspace_controller->SetShelf(shelf_layout_manager_); |
632 | 632 |
633 status_container->SetLayoutManager(new StatusAreaLayoutManager(this)); | 633 status_container->SetLayoutManager( |
| 634 new StatusAreaLayoutManager(status_container, this)); |
634 | 635 |
635 shelf_container->SetEventTargeter(scoped_ptr<ui::EventTargeter>(new | 636 shelf_container->SetEventTargeter(scoped_ptr<ui::EventTargeter>(new |
636 ShelfWindowTargeter(shelf_container, shelf_layout_manager_))); | 637 ShelfWindowTargeter(shelf_container, shelf_layout_manager_))); |
637 status_container->SetEventTargeter(scoped_ptr<ui::EventTargeter>(new | 638 status_container->SetEventTargeter(scoped_ptr<ui::EventTargeter>(new |
638 ShelfWindowTargeter(status_container, shelf_layout_manager_))); | 639 ShelfWindowTargeter(status_container, shelf_layout_manager_))); |
639 | 640 |
640 views::Widget::AddObserver(this); | 641 views::Widget::AddObserver(this); |
641 } | 642 } |
642 | 643 |
643 ShelfWidget::~ShelfWidget() { | 644 ShelfWidget::~ShelfWidget() { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 DCHECK(delegate_view_); | 802 DCHECK(delegate_view_); |
802 return delegate_view_->disable_dimming_animations_for_test(); | 803 return delegate_view_->disable_dimming_animations_for_test(); |
803 } | 804 } |
804 | 805 |
805 void ShelfWidget::WillDeleteShelf() { | 806 void ShelfWidget::WillDeleteShelf() { |
806 shelf_layout_manager_->RemoveObserver(this); | 807 shelf_layout_manager_->RemoveObserver(this); |
807 shelf_layout_manager_ = NULL; | 808 shelf_layout_manager_ = NULL; |
808 } | 809 } |
809 | 810 |
810 } // namespace ash | 811 } // namespace ash |
OLD | NEW |