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

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

Issue 10984034: Revert 158691 - Give platform apps control over launcher right-click context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 const std::string& app_id) { 397 const std::string& app_id) {
398 for (IDToItemControllerMap::const_iterator i = 398 for (IDToItemControllerMap::const_iterator i =
399 id_to_item_controller_map_.begin(); 399 id_to_item_controller_map_.begin();
400 i != id_to_item_controller_map_.end(); ++i) { 400 i != id_to_item_controller_map_.end(); ++i) {
401 if (i->second->app_id() == app_id) 401 if (i->second->app_id() == app_id)
402 return i->first; 402 return i->first;
403 } 403 }
404 return 0; 404 return 0;
405 } 405 }
406 406
407 std::string ChromeLauncherController::GetAppIDForLauncherID(
408 ash::LauncherID id) {
409 DCHECK(id_to_item_controller_map_.find(id) !=
410 id_to_item_controller_map_.end());
411 return id_to_item_controller_map_[id]->app_id();
412 }
413
414 void ChromeLauncherController::SetAppImage(const std::string& id, 407 void ChromeLauncherController::SetAppImage(const std::string& id,
415 const gfx::ImageSkia& image) { 408 const gfx::ImageSkia& image) {
416 // TODO: need to get this working for shortcuts. 409 // TODO: need to get this working for shortcuts.
417 410
418 for (IDToItemControllerMap::const_iterator i = 411 for (IDToItemControllerMap::const_iterator i =
419 id_to_item_controller_map_.begin(); 412 id_to_item_controller_map_.begin();
420 i != id_to_item_controller_map_.end(); ++i) { 413 i != id_to_item_controller_map_.end(); ++i) {
421 if (i->second->app_id() != id) 414 if (i->second->app_id() != id)
422 continue; 415 continue;
423 416
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 if (current_tab) { 981 if (current_tab) {
989 content::NavigationEntry* active_entry = 982 content::NavigationEntry* active_entry =
990 current_tab->GetController().GetActiveEntry(); 983 current_tab->GetController().GetActiveEntry();
991 if (active_entry && 984 if (active_entry &&
992 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) 985 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL))
993 return true; 986 return true;
994 } 987 }
995 return false; 988 return false;
996 } 989 }
997 990
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.h ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698