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/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 | 236 |
237 Activate(ash::LAUNCH_FROM_UNKNOWN); | 237 Activate(ash::LAUNCH_FROM_UNKNOWN); |
238 } | 238 } |
239 | 239 |
240 string16 BrowserShortcutLauncherItemController::GetTitle() { | 240 string16 BrowserShortcutLauncherItemController::GetTitle() { |
241 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 241 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
242 } | 242 } |
243 | 243 |
244 ui::MenuModel* BrowserShortcutLauncherItemController::CreateContextMenu( | 244 ui::MenuModel* BrowserShortcutLauncherItemController::CreateContextMenu( |
245 aura::RootWindow* root_window) { | 245 aura::Window* root_window) { |
246 ash::LauncherItem item = | 246 ash::LauncherItem item = |
247 *(launcher_controller()->model()->ItemByID(launcher_id())); | 247 *(launcher_controller()->model()->ItemByID(launcher_id())); |
248 return new LauncherContextMenu(launcher_controller(), &item, root_window); | 248 return new LauncherContextMenu(launcher_controller(), &item, root_window); |
249 } | 249 } |
250 | 250 |
251 ash::LauncherMenuModel* | 251 ash::LauncherMenuModel* |
252 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { | 252 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { |
253 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); | 253 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); |
254 } | 254 } |
255 | 255 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 return (browser && | 339 return (browser && |
340 launcher_controller()->IsBrowserFromActiveUser(browser) && | 340 launcher_controller()->IsBrowserFromActiveUser(browser) && |
341 browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH && | 341 browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH && |
342 (browser->is_type_tabbed() || | 342 (browser->is_type_tabbed() || |
343 !browser->is_app() || | 343 !browser->is_app() || |
344 !browser->is_type_popup() || | 344 !browser->is_type_popup() || |
345 launcher_controller()-> | 345 launcher_controller()-> |
346 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( | 346 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( |
347 browser->app_name())) <= 0)); | 347 browser->app_name())) <= 0)); |
348 } | 348 } |
OLD | NEW |