| OLD | NEW |
| 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 Loading... |
| 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 |
| 407 void ChromeLauncherController::SetAppImage(const std::string& id, | 414 void ChromeLauncherController::SetAppImage(const std::string& id, |
| 408 const gfx::ImageSkia& image) { | 415 const gfx::ImageSkia& image) { |
| 409 // TODO: need to get this working for shortcuts. | 416 // TODO: need to get this working for shortcuts. |
| 410 | 417 |
| 411 for (IDToItemControllerMap::const_iterator i = | 418 for (IDToItemControllerMap::const_iterator i = |
| 412 id_to_item_controller_map_.begin(); | 419 id_to_item_controller_map_.begin(); |
| 413 i != id_to_item_controller_map_.end(); ++i) { | 420 i != id_to_item_controller_map_.end(); ++i) { |
| 414 if (i->second->app_id() != id) | 421 if (i->second->app_id() != id) |
| 415 continue; | 422 continue; |
| 416 | 423 |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 if (current_tab) { | 988 if (current_tab) { |
| 982 content::NavigationEntry* active_entry = | 989 content::NavigationEntry* active_entry = |
| 983 current_tab->GetController().GetActiveEntry(); | 990 current_tab->GetController().GetActiveEntry(); |
| 984 if (active_entry && | 991 if (active_entry && |
| 985 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) | 992 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) |
| 986 return true; | 993 return true; |
| 987 } | 994 } |
| 988 return false; | 995 return false; |
| 989 } | 996 } |
| 990 | 997 |
| OLD | NEW |