Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: ash/shelf/shelf_widget.cc

Issue 71653003: ash: Rename LauncherModel to ShelfModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome changes Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/launcher/launcher_delegate.h" 9 #include "ash/launcher/launcher_delegate.h"
10 #include "ash/launcher/launcher_model.h"
11 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
12 #include "ash/session_state_delegate.h" 11 #include "ash/session_state_delegate.h"
13 #include "ash/shelf/shelf_layout_manager.h" 12 #include "ash/shelf/shelf_layout_manager.h"
13 #include "ash/shelf/shelf_model.h"
14 #include "ash/shelf/shelf_navigator.h" 14 #include "ash/shelf/shelf_navigator.h"
15 #include "ash/shelf/shelf_view.h" 15 #include "ash/shelf/shelf_view.h"
16 #include "ash/shelf/shelf_widget.h" 16 #include "ash/shelf/shelf_widget.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "ash/shell_window_ids.h" 18 #include "ash/shell_window_ids.h"
19 #include "ash/system/tray/system_tray_delegate.h" 19 #include "ash/system/tray/system_tray_delegate.h"
20 #include "ash/wm/status_area_layout_manager.h" 20 #include "ash/wm/status_area_layout_manager.h"
21 #include "ash/wm/window_properties.h" 21 #include "ash/wm/window_properties.h"
22 #include "ash/wm/workspace_controller.h" 22 #include "ash/wm/workspace_controller.h"
23 #include "grit/ash_resources.h" 23 #include "grit/ash_resources.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 597
598 bool ShelfWidget::GetDimsShelf() const { 598 bool ShelfWidget::GetDimsShelf() const {
599 return delegate_view_->GetDimmed(); 599 return delegate_view_->GetDimmed();
600 } 600 }
601 601
602 void ShelfWidget::CreateLauncher() { 602 void ShelfWidget::CreateLauncher() {
603 if (launcher_) 603 if (launcher_)
604 return; 604 return;
605 605
606 Shell* shell = Shell::GetInstance(); 606 Shell* shell = Shell::GetInstance();
607 // This needs to be called before launcher_model(). 607 // This needs to be called before shelf_model().
608 LauncherDelegate* launcher_delegate = shell->GetLauncherDelegate(); 608 LauncherDelegate* launcher_delegate = shell->GetLauncherDelegate();
609 if (!launcher_delegate) 609 if (!launcher_delegate)
610 return; // Not ready to create Launcher 610 return; // Not ready to create Launcher
611 611
612 launcher_.reset(new Launcher(shell->launcher_model(), 612 launcher_.reset(new Launcher(shell->shelf_model(),
613 shell->GetLauncherDelegate(), 613 shell->GetLauncherDelegate(),
614 this)); 614 this));
615 SetFocusCycler(shell->focus_cycler()); 615 SetFocusCycler(shell->focus_cycler());
616 616
617 // Inform the root window controller. 617 // Inform the root window controller.
618 internal::RootWindowController::ForWindow(window_container_)-> 618 internal::RootWindowController::ForWindow(window_container_)->
619 OnLauncherCreated(); 619 OnLauncherCreated();
620 620
621 launcher_->SetVisible( 621 launcher_->SetVisible(
622 shell->session_state_delegate()->IsActiveUserSessionStarted()); 622 shell->session_state_delegate()->IsActiveUserSessionStarted());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 return delegate_view_->GetDimmerBoundsForTest(); 673 return delegate_view_->GetDimmerBoundsForTest();
674 return gfx::Rect(); 674 return gfx::Rect();
675 } 675 }
676 676
677 void ShelfWidget::DisableDimmingAnimationsForTest() { 677 void ShelfWidget::DisableDimmingAnimationsForTest() {
678 DCHECK(delegate_view_); 678 DCHECK(delegate_view_);
679 return delegate_view_->disable_dimming_animations_for_test(); 679 return delegate_view_->disable_dimming_animations_for_test();
680 } 680 }
681 681
682 } // namespace ash 682 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698