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

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

Issue 22887015: Remove PerBrowser launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 7 years, 4 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
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 f732149bde635d23264d9e095987be1120618683..2f0020122e542c937fce17ab87b00525769891f5 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
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h"
-#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
@@ -36,12 +36,11 @@
#endif
BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController(
- ChromeLauncherControllerPerApp* launcher_controller,
+ ChromeLauncherController* launcher_controller,
Profile* profile)
: LauncherItemController(TYPE_SHORTCUT,
extension_misc::kChromeAppId,
launcher_controller),
- app_controller_(launcher_controller),
profile_(profile) {
}
@@ -158,7 +157,7 @@ BrowserShortcutLauncherItemController::GetApplicationList(int event_flags) {
continue;
if (browser->is_type_tabbed())
found_tabbed_browser = true;
- else if (!app_controller_->IsBrowserRepresentedInBrowserList(browser))
+ else if (!launcher_controller()->IsBrowserRepresentedInBrowserList(browser))
continue;
TabStripModel* tab_strip = browser->tab_strip_model();
if (tab_strip->active_index() == -1)
@@ -174,8 +173,9 @@ BrowserShortcutLauncherItemController::GetApplicationList(int event_flags) {
for (int index = 0; index < tab_strip->count(); ++index) {
content::WebContents* web_contents =
tab_strip->GetWebContentsAt(index);
- gfx::Image app_icon = app_controller_->GetAppListIcon(web_contents);
- string16 title = app_controller_->GetAppListTitle(web_contents);
+ gfx::Image app_icon =
+ launcher_controller()->GetAppListIcon(web_contents);
+ string16 title = launcher_controller()->GetAppListTitle(web_contents);
// Check if we need to insert a separator in front.
bool leading_separator = !index;
items.push_back(new ChromeLauncherAppMenuItemTab(
@@ -223,7 +223,7 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
for (BrowserList::const_iterator it =
ash_browser_list->begin();
it != ash_browser_list->end(); ++it) {
- if (app_controller_->IsBrowserRepresentedInBrowserList(*it))
+ if (launcher_controller()->IsBrowserRepresentedInBrowserList(*it))
items.push_back(*it);
}
// If there are no suitable browsers we create a new one.
@@ -254,7 +254,7 @@ void BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
true,
chrome::HOST_DESKTOP_TYPE_ASH);
if (!browser ||
- !app_controller_->IsBrowserRepresentedInBrowserList(browser))
+ !launcher_controller()->IsBrowserRepresentedInBrowserList(browser))
browser = items[0];
}
}

Powered by Google App Engine
This is Rietveld 408576698