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

Side by Side Diff: ash/root_window_controller.cc

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 months 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
« no previous file with comments | « ash/mus/window_manager.cc ('k') | ash/shell.h » ('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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // brightness/grayscale animation. 529 // brightness/grayscale animation.
530 boot_splash_screen_->StartHideAnimation( 530 boot_splash_screen_->StartHideAnimation(
531 base::TimeDelta::FromMilliseconds(kBootSplashScreenHideDurationMs)); 531 base::TimeDelta::FromMilliseconds(kBootSplashScreenHideDurationMs));
532 } 532 }
533 } 533 }
534 534
535 void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) { 535 void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) {
536 // Make sure the wallpaper is visible. 536 // Make sure the wallpaper is visible.
537 system_wallpaper_->SetColor(SK_ColorBLACK); 537 system_wallpaper_->SetColor(SK_ColorBLACK);
538 boot_splash_screen_.reset(); 538 boot_splash_screen_.reset();
539 WmShell::Get()->wallpaper_delegate()->OnWallpaperAnimationFinished(); 539 Shell::Get()->wallpaper_delegate()->OnWallpaperAnimationFinished();
540 // Only removes old component when wallpaper animation finished. If we 540 // Only removes old component when wallpaper animation finished. If we
541 // remove the old one before the new wallpaper is done fading in there will 541 // remove the old one before the new wallpaper is done fading in there will
542 // be a white flash during the animation. 542 // be a white flash during the animation.
543 if (animating_wallpaper_widget_controller()) { 543 if (animating_wallpaper_widget_controller()) {
544 WallpaperWidgetController* controller = 544 WallpaperWidgetController* controller =
545 animating_wallpaper_widget_controller()->GetController(true); 545 animating_wallpaper_widget_controller()->GetController(true);
546 DCHECK_EQ(controller->widget(), widget); 546 DCHECK_EQ(controller->widget(), widget);
547 // Release the old controller and close its wallpaper widget. 547 // Release the old controller and close its wallpaper widget.
548 SetWallpaperWidgetController(controller); 548 SetWallpaperWidgetController(controller);
549 } 549 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 } 720 }
721 721
722 void RootWindowController::SetTouchAccessibilityAnchorPoint( 722 void RootWindowController::SetTouchAccessibilityAnchorPoint(
723 const gfx::Point& anchor_point) { 723 const gfx::Point& anchor_point) {
724 if (touch_exploration_manager_) 724 if (touch_exploration_manager_)
725 touch_exploration_manager_->SetTouchAccessibilityAnchorPoint(anchor_point); 725 touch_exploration_manager_->SetTouchAccessibilityAnchorPoint(anchor_point);
726 } 726 }
727 727
728 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen, 728 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
729 ui::MenuSourceType source_type) { 729 ui::MenuSourceType source_type) {
730 ShellDelegate* delegate = WmShell::Get()->delegate(); 730 ShellDelegate* delegate = Shell::Get()->shell_delegate();
731 DCHECK(delegate); 731 DCHECK(delegate);
732 menu_model_.reset(delegate->CreateContextMenu(wm_shelf_.get(), nullptr)); 732 menu_model_.reset(delegate->CreateContextMenu(wm_shelf_.get(), nullptr));
733 if (!menu_model_) 733 if (!menu_model_)
734 return; 734 return;
735 735
736 menu_model_adapter_ = base::MakeUnique<views::MenuModelAdapter>( 736 menu_model_adapter_ = base::MakeUnique<views::MenuModelAdapter>(
737 menu_model_.get(), 737 menu_model_.get(),
738 base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this))); 738 base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this)));
739 739
740 // The wallpaper controller may not be set yet if the user clicked on the 740 // The wallpaper controller may not be set yet if the user clicked on the
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 EnableTouchHudProjection(); 1153 EnableTouchHudProjection();
1154 else 1154 else
1155 DisableTouchHudProjection(); 1155 DisableTouchHudProjection();
1156 } 1156 }
1157 1157
1158 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1158 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1159 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1159 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1160 } 1160 }
1161 1161
1162 } // namespace ash 1162 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698