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

Unified Diff: ash/wm/ash_activation_controller.cc

Issue 11594004: Revert 173417 - Broke on win_aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/ash_activation_controller.h ('k') | ash/wm/ash_activation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_activation_controller.cc
===================================================================
--- ash/wm/ash_activation_controller.cc (revision 173420)
+++ ash/wm/ash_activation_controller.cc (working copy)
@@ -4,16 +4,13 @@
#include "ash/wm/ash_activation_controller.h"
-#include "ash/launcher/launcher.h"
#include "ash/root_window_controller.h"
#include "ash/shell.h"
-#include "ash/shell_delegate.h"
#include "ash/wm/activation_controller.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h"
#include "ui/views/corewm/window_modality_controller.h"
-#include "ui/views/widget/widget.h"
namespace ash {
namespace internal {
@@ -37,10 +34,6 @@
if (window_modal_transient)
return window_modal_transient;
- // Fallback to launcher
- if (!window)
- window = PrepareToActivateLauncher();
-
// Make sure the workspace manager switches to the workspace for window.
// Without this CanReceiveEvents() below returns false and activation never
// changes. CanReceiveEvents() returns false if |window| isn't in the active
@@ -84,35 +77,5 @@
return window;
}
-aura::Window* AshActivationController::PrepareToActivateLauncher() {
- // If workspace controller is not available, then it means that the root
- // window is being destroyed. We can't activate any window then.
- if (!GetRootWindowController(
- Shell::GetActiveRootWindow())->workspace_controller()) {
- return NULL;
- }
- // Fallback to a launcher only when Spoken feedback is enabled.
- if (!Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled())
- return NULL;
- Launcher* launcher;
- if (Shell::IsLauncherPerDisplayEnabled()) {
- launcher = GetRootWindowController(
- Shell::GetActiveRootWindow())->launcher();
- } else {
- launcher = Launcher::ForPrimaryDisplay();
- }
- // Launcher is not always available, eg. not in the login screen.
- if (!launcher)
- return NULL;
- views::Widget* launcher_widget = launcher->widget();
- // Launcher's window may be already destroyed in shutting down process.
- if (!launcher_widget)
- return NULL;
- aura::Window* launcher_window = launcher_widget->GetNativeWindow();
- // Notify launcher to allow activation via CanActivate().
- launcher->WillActivateAsFallback();
- return launcher_window;
-}
-
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/ash_activation_controller.h ('k') | ash/wm/ash_activation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698