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

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

Issue 58813002: Upon activation on mixed mode, we only show and use apps of the current user. Furthermore we should… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
index 737c97dcb20417bf9abae489bac1b99b582a687b..0f8b1a116565a64bd4a26125600362a3c33e0c64 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
@@ -143,7 +143,7 @@ void BrowserShortcutLauncherItemController::Launch(ash::LaunchSource source,
int event_flags) {
}
-void BrowserShortcutLauncherItemController::Activate(ash::LaunchSource source) {
+bool BrowserShortcutLauncherItemController::Activate(ash::LaunchSource source) {
Browser* last_browser = chrome::FindTabbedBrowser(
launcher_controller()->profile(),
true,
@@ -151,11 +151,12 @@ void BrowserShortcutLauncherItemController::Activate(ash::LaunchSource source) {
if (!last_browser) {
launcher_controller()->CreateNewWindow();
- return;
+ return true;
}
launcher_controller()->ActivateWindowOrMinimizeIfActive(
last_browser->window(), GetApplicationList(0).size() == 2);
+ return false;
}
void BrowserShortcutLauncherItemController::Close() {
@@ -215,7 +216,7 @@ BrowserShortcutLauncherItemController::GetApplicationList(int event_flags) {
return items.Pass();
}
-void BrowserShortcutLauncherItemController::ItemSelected(
+bool BrowserShortcutLauncherItemController::ItemSelected(
const ui::Event& event) {
#if defined(OS_CHROMEOS)
chromeos::default_pinned_apps_field_trial::RecordShelfClick(
@@ -224,17 +225,17 @@ void BrowserShortcutLauncherItemController::ItemSelected(
if (event.flags() & ui::EF_CONTROL_DOWN) {
launcher_controller()->CreateNewWindow();
- return;
+ return true;
}
// In case of a keyboard event, we were called by a hotkey. In that case we
// activate the next item in line if an item of our list is already active.
if (event.type() & ui::ET_KEY_RELEASED) {
ActivateOrAdvanceToNextBrowser();
- return;
+ return false;
}
- Activate(ash::LAUNCH_FROM_UNKNOWN);
+ return Activate(ash::LAUNCH_FROM_UNKNOWN);
}
string16 BrowserShortcutLauncherItemController::GetTitle() {

Powered by Google App Engine
This is Rietveld 408576698