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

Side by Side Diff: ash/wm/ash_activation_controller.cc

Issue 14584004: Remove ash-disable-launcher-per-display flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/shell.cc ('k') | chrome/app/generated_resources.grd » ('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/wm/ash_activation_controller.h" 5 #include "ash/wm/ash_activation_controller.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // If workspace controller is not available, then it means that the root 89 // If workspace controller is not available, then it means that the root
90 // window is being destroyed. We can't activate any window then. 90 // window is being destroyed. We can't activate any window then.
91 if (!GetRootWindowController( 91 if (!GetRootWindowController(
92 Shell::GetActiveRootWindow())->workspace_controller()) { 92 Shell::GetActiveRootWindow())->workspace_controller()) {
93 return NULL; 93 return NULL;
94 } 94 }
95 // Fallback to a launcher only when Spoken feedback is enabled. 95 // Fallback to a launcher only when Spoken feedback is enabled.
96 if (!Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled()) 96 if (!Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled())
97 return NULL; 97 return NULL;
98 ShelfWidget* shelf = GetRootWindowController( 98 ShelfWidget* shelf = GetRootWindowController(
99 Shell::IsLauncherPerDisplayEnabled() ? 99 Shell::GetActiveRootWindow())->shelf();
100 Shell::GetActiveRootWindow() :
101 Shell::GetPrimaryRootWindow())->shelf();
102 // Launcher's window may be already destroyed in shutting down process. 100 // Launcher's window may be already destroyed in shutting down process.
103 if (!shelf) 101 if (!shelf)
104 return NULL; 102 return NULL;
105 // Notify launcher to allow activation via CanActivate(). 103 // Notify launcher to allow activation via CanActivate().
106 shelf->WillActivateAsFallback(); 104 shelf->WillActivateAsFallback();
107 return shelf->GetNativeWindow(); 105 return shelf->GetNativeWindow();
108 } 106 }
109 107
110 } // namespace internal 108 } // namespace internal
111 } // namespace ash 109 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698