OLD | NEW |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 | 232 |
233 bool BrowserShortcutLauncherItemController::IsDraggable() { | 233 bool BrowserShortcutLauncherItemController::IsDraggable() { |
234 return true; | 234 return true; |
235 } | 235 } |
236 | 236 |
237 bool BrowserShortcutLauncherItemController::CanPin() const { | 237 bool BrowserShortcutLauncherItemController::CanPin() const { |
238 return true; | 238 return true; |
239 } | 239 } |
240 | 240 |
241 bool BrowserShortcutLauncherItemController::ShouldShowTooltip() { | |
242 return true; | |
243 } | |
244 | |
245 bool BrowserShortcutLauncherItemController::IsListOfActiveBrowserEmpty() { | 241 bool BrowserShortcutLauncherItemController::IsListOfActiveBrowserEmpty() { |
246 return GetListOfActiveBrowsers().empty(); | 242 return GetListOfActiveBrowsers().empty(); |
247 } | 243 } |
248 | 244 |
249 gfx::Image BrowserShortcutLauncherItemController::GetBrowserListIcon( | 245 gfx::Image BrowserShortcutLauncherItemController::GetBrowserListIcon( |
250 content::WebContents* web_contents) const { | 246 content::WebContents* web_contents) const { |
251 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 247 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
252 return rb.GetImageNamed(IsIncognito(web_contents) ? | 248 return rb.GetImageNamed(IsIncognito(web_contents) ? |
253 IDR_ASH_SHELF_LIST_INCOGNITO_BROWSER : | 249 IDR_ASH_SHELF_LIST_INCOGNITO_BROWSER : |
254 IDR_ASH_SHELF_LIST_BROWSER); | 250 IDR_ASH_SHELF_LIST_BROWSER); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 !browser->window()->IsMinimized()) { | 345 !browser->window()->IsMinimized()) { |
350 continue; | 346 continue; |
351 } | 347 } |
352 if (!IsBrowserRepresentedInBrowserList(browser) && | 348 if (!IsBrowserRepresentedInBrowserList(browser) && |
353 !browser->is_type_tabbed()) | 349 !browser->is_type_tabbed()) |
354 continue; | 350 continue; |
355 active_browsers.push_back(browser); | 351 active_browsers.push_back(browser); |
356 } | 352 } |
357 return active_browsers; | 353 return active_browsers; |
358 } | 354 } |
OLD | NEW |