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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Fix and workaround test issues. Created 4 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 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 3ececf48d800737b61343ea1de4ce34996e0a941..90698773834ca0faf745f52812d9cd9d50430ce7 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
@@ -142,7 +142,7 @@ bool BrowserShortcutLauncherItemController::IsOpen() const {
bool BrowserShortcutLauncherItemController::IsVisible() const {
Browser* last_browser =
- chrome::FindTabbedBrowser(launcher_controller()->GetProfile(), true);
+ chrome::FindTabbedBrowser(launcher_controller()->profile(), true);
if (!last_browser) {
return false;
@@ -159,10 +159,10 @@ void BrowserShortcutLauncherItemController::Launch(ash::LaunchSource source,
ash::ShelfItemDelegate::PerformedAction
BrowserShortcutLauncherItemController::Activate(ash::LaunchSource source) {
Browser* last_browser =
- chrome::FindTabbedBrowser(launcher_controller()->GetProfile(), true);
+ chrome::FindTabbedBrowser(launcher_controller()->profile(), true);
if (!last_browser) {
- chrome::NewEmptyWindow(launcher_controller()->GetProfile());
+ chrome::NewEmptyWindow(launcher_controller()->profile());
return kNewWindowCreated;
}
@@ -219,7 +219,7 @@ BrowserShortcutLauncherItemController::GetApplicationList(int event_flags) {
ash::ShelfItemDelegate::PerformedAction
BrowserShortcutLauncherItemController::ItemSelected(const ui::Event& event) {
if (event.flags() & ui::EF_CONTROL_DOWN) {
- chrome::NewEmptyWindow(launcher_controller()->GetProfile());
+ chrome::NewEmptyWindow(launcher_controller()->profile());
return kNewWindowCreated;
}
@@ -294,7 +294,7 @@ BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
}
// If there are no suitable browsers we create a new one.
if (items.empty()) {
- chrome::NewEmptyWindow(launcher_controller()->GetProfile());
+ chrome::NewEmptyWindow(launcher_controller()->profile());
return kNewWindowCreated;
}
Browser* browser = chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow());
@@ -317,9 +317,8 @@ BrowserShortcutLauncherItemController::ActivateOrAdvanceToNextBrowser() {
browser = (++i == items.end()) ? items[0] : *i;
} else {
browser =
- chrome::FindTabbedBrowser(launcher_controller()->GetProfile(), true);
- if (!browser ||
- !IsBrowserRepresentedInBrowserList(browser))
+ chrome::FindTabbedBrowser(launcher_controller()->profile(), true);
+ if (!browser || !IsBrowserRepresentedInBrowserList(browser))
browser = items[0];
}
}

Powered by Google App Engine
This is Rietveld 408576698