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

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

Issue 12262019: Replace static/native-desktop-only BrowserList::const_reverse_iterator by desktop specific ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome_launcher_controller_per_app_unittest should be creating browsers on the ash desktop 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
index 80e7623ea6e32e7abcd276e437c4bbcc332a9dd7..190a91f6956b3cff64fc9e13aea39455c49361dc 100644
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
@@ -13,9 +13,10 @@
#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_list_impl.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/native_app_window.h"
+#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/web_contents.h"
@@ -144,9 +145,11 @@ AppShortcutLauncherItemController::GetRunningApplications() {
const Extension* extension =
launcher_controller()->GetExtensionForAppID(app_id());
- for (BrowserList::const_reverse_iterator it =
- BrowserList::begin_last_active();
- it != BrowserList::end_last_active(); ++it) {
+ const chrome::BrowserListImpl* ash_browser_list =
+ chrome::BrowserListImpl::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH);
+ for (chrome::BrowserListImpl::const_reverse_iterator it =
+ ash_browser_list->begin_last_active();
+ it != ash_browser_list->end_last_active(); ++it) {
Browser* browser = *it;
TabStripModel* tab_strip = browser->tab_strip_model();
// We start to enumerate from the active index.
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698