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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 | 229 |
230 Activate(ash::LAUNCH_FROM_UNKNOWN); | 230 Activate(ash::LAUNCH_FROM_UNKNOWN); |
231 } | 231 } |
232 | 232 |
233 string16 BrowserShortcutLauncherItemController::GetTitle() { | 233 string16 BrowserShortcutLauncherItemController::GetTitle() { |
234 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 234 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
235 } | 235 } |
236 | 236 |
237 ui::MenuModel* BrowserShortcutLauncherItemController::CreateContextMenu( | 237 ui::MenuModel* BrowserShortcutLauncherItemController::CreateContextMenu( |
238 aura::RootWindow* root_window) { | 238 aura::Window* root_window) { |
239 ash::LauncherItem item = | 239 ash::LauncherItem item = |
240 *(launcher_controller()->model()->ItemByID(launcher_id())); | 240 *(launcher_controller()->model()->ItemByID(launcher_id())); |
241 return new LauncherContextMenu(launcher_controller(), &item, root_window); | 241 return new LauncherContextMenu(launcher_controller(), &item, root_window); |
242 } | 242 } |
243 | 243 |
244 ash::LauncherMenuModel* | 244 ash::LauncherMenuModel* |
245 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { | 245 BrowserShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { |
246 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); | 246 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); |
247 } | 247 } |
248 | 248 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 Browser* browser) { | 331 Browser* browser) { |
332 return (browser && | 332 return (browser && |
333 browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH && | 333 browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH && |
334 (browser->is_type_tabbed() || | 334 (browser->is_type_tabbed() || |
335 !browser->is_app() || | 335 !browser->is_app() || |
336 !browser->is_type_popup() || | 336 !browser->is_type_popup() || |
337 launcher_controller()-> | 337 launcher_controller()-> |
338 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( | 338 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( |
339 browser->app_name())) <= 0)); | 339 browser->app_name())) <= 0)); |
340 } | 340 } |
OLD | NEW |