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

Unified Diff: chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc

Issue 12674045: ShellWindowLauncherItemController::RestoreOrShow -> ShowAndActivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
index e1c4ee0b908e1e7b0897bf44ad425a229c780c31..207ae16c04854f5ebc8aa921e2831f0b77ee12ec 100644
--- a/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
@@ -142,7 +142,7 @@ void ShellWindowLauncherItemController::Clicked(const ui::Event& event) {
shell_windows_.size() == 1) {
ShellWindow* window_to_show = last_active_shell_window_ ?
last_active_shell_window_ : shell_windows_.front();
- RestoreOrShow(window_to_show);
+ ShowAndActivate(window_to_show);
} else {
// TODO(stevenjb): Deprecate
if (!last_active_shell_window_ ||
@@ -156,7 +156,7 @@ void ShellWindowLauncherItemController::Clicked(const ui::Event& event) {
}
}
if (last_active_shell_window_)
- RestoreOrShow(last_active_shell_window_);
+ ShowAndActivate(last_active_shell_window_);
}
}
@@ -165,7 +165,7 @@ void ShellWindowLauncherItemController::ActivateIndexedApp(size_t index) {
return;
ShellWindowList::iterator it = shell_windows_.begin();
std::advance(it, index);
- RestoreOrShow(*it);
+ ShowAndActivate(*it);
}
ChromeLauncherAppMenuItems
@@ -206,12 +206,9 @@ void ShellWindowLauncherItemController::OnWindowPropertyChanged(
}
}
-void ShellWindowLauncherItemController::RestoreOrShow(
+void ShellWindowLauncherItemController::ShowAndActivate(
ShellWindow* shell_window) {
- if (shell_window->GetBaseWindow()->IsMinimized())
- shell_window->GetBaseWindow()->Restore();
- else
- shell_window->GetBaseWindow()->Show();
// Always activate windows when shown from the launcher.
+ shell_window->GetBaseWindow()->Show();
shell_window->GetBaseWindow()->Activate();
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698