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

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

Issue 2575613002: Remove ShelfItemDelegate::IsDraggable; check for app list button. (Closed)
Patch Set: Address comments. Created 4 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser_shortcut_launcher_item_controll er.h" 5 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll er.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/shelf/shelf_delegate.h" 10 #include "ash/common/shelf/shelf_delegate.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 base::string16 BrowserShortcutLauncherItemController::GetTitle() { 224 base::string16 BrowserShortcutLauncherItemController::GetTitle() {
225 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 225 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
226 } 226 }
227 227
228 ash::ShelfMenuModel* 228 ash::ShelfMenuModel*
229 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { 229 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) {
230 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 230 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
231 } 231 }
232 232
233 bool BrowserShortcutLauncherItemController::IsDraggable() {
234 return true;
235 }
236
237 bool BrowserShortcutLauncherItemController::CanPin() const { 233 bool BrowserShortcutLauncherItemController::CanPin() const {
238 return true; 234 return true;
239 } 235 }
240 236
241 bool BrowserShortcutLauncherItemController::IsListOfActiveBrowserEmpty() { 237 bool BrowserShortcutLauncherItemController::IsListOfActiveBrowserEmpty() {
242 return GetListOfActiveBrowsers().empty(); 238 return GetListOfActiveBrowsers().empty();
243 } 239 }
244 240
245 gfx::Image BrowserShortcutLauncherItemController::GetBrowserListIcon( 241 gfx::Image BrowserShortcutLauncherItemController::GetBrowserListIcon(
246 content::WebContents* web_contents) const { 242 content::WebContents* web_contents) const {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 !browser->window()->IsMinimized()) { 341 !browser->window()->IsMinimized()) {
346 continue; 342 continue;
347 } 343 }
348 if (!IsBrowserRepresentedInBrowserList(browser) && 344 if (!IsBrowserRepresentedInBrowserList(browser) &&
349 !browser->is_type_tabbed()) 345 !browser->is_type_tabbed())
350 continue; 346 continue;
351 active_browsers.push_back(browser); 347 active_browsers.push_back(browser);
352 } 348 }
353 return active_browsers; 349 return active_browsers;
354 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698