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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc

Issue 12288012: Showing launcher items for windowed v1 apps - pinned or not. Also - don't show windowed v1 apps in … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing build breakage with clang Created 7 years, 10 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 | Annotate | Revision Log
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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser. h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser. h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 bool ChromeLauncherControllerPerBrowser::IsPinnable(ash::LauncherID id) const { 444 bool ChromeLauncherControllerPerBrowser::IsPinnable(ash::LauncherID id) const {
445 int index = model_->ItemIndexByID(id); 445 int index = model_->ItemIndexByID(id);
446 if (index == -1) 446 if (index == -1)
447 return false; 447 return false;
448 448
449 ash::LauncherItemType type = model_->items()[index].type; 449 ash::LauncherItemType type = model_->items()[index].type;
450 return ((type == ash::TYPE_APP_SHORTCUT || type == ash::TYPE_PLATFORM_APP) && 450 return ((type == ash::TYPE_APP_SHORTCUT || type == ash::TYPE_PLATFORM_APP) &&
451 CanPin()); 451 CanPin());
452 } 452 }
453 453
454 void ChromeLauncherControllerPerBrowser::LockV1AppWithID(
455 const std::string& app_id) {
456 }
457
458 void ChromeLauncherControllerPerBrowser::UnlockV1AppWithID(
459 const std::string& app_id) {
460 }
461
454 void ChromeLauncherControllerPerBrowser::Launch( 462 void ChromeLauncherControllerPerBrowser::Launch(
455 ash::LauncherID id, int event_flags) { 463 ash::LauncherID id, int event_flags) {
456 if (!HasItemController(id)) 464 if (!HasItemController(id))
457 return; // In case invoked from menu and item closed while menu up. 465 return; // In case invoked from menu and item closed while menu up.
458 id_to_item_controller_map_[id]->Launch(event_flags); 466 id_to_item_controller_map_[id]->Launch(event_flags);
459 } 467 }
460 468
461 void ChromeLauncherControllerPerBrowser::Close(ash::LauncherID id) { 469 void ChromeLauncherControllerPerBrowser::Close(ash::LauncherID id) {
462 if (!HasItemController(id)) 470 if (!HasItemController(id))
463 return; // May happen if menu closed. 471 return; // May happen if menu closed.
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( 1309 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest(
1302 ash::AppIconLoader* loader) { 1310 ash::AppIconLoader* loader) {
1303 app_icon_loader_.reset(loader); 1311 app_icon_loader_.reset(loader);
1304 } 1312 }
1305 1313
1306 const std::string& 1314 const std::string&
1307 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( 1315 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest(
1308 ash::LauncherID id) { 1316 ash::LauncherID id) {
1309 return id_to_item_controller_map_[id]->app_id(); 1317 return id_to_item_controller_map_[id]->app_id();
1310 } 1318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698