1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/extensions/chrome/app_list_controller_delegate_athena.h"
7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/extensions/public/extensions_delegate.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "extensions/common/extension.h"
11 #include "ui/app_list/views/app_list_view.h"
15 AppListControllerDelegateAthena::AppListControllerDelegateAthena() {
18 AppListControllerDelegateAthena::~AppListControllerDelegateAthena() {
21 void AppListControllerDelegateAthena::DismissView() {
24 gfx::NativeWindow
AppListControllerDelegateAthena::GetAppListWindow() {
29 gfx::Rect
AppListControllerDelegateAthena::GetAppListBounds() {
34 gfx::ImageSkia
AppListControllerDelegateAthena::GetWindowIcon() {
35 return gfx::ImageSkia();
38 bool AppListControllerDelegateAthena::IsAppPinned(
39 const std::string
& extension_id
) {
43 void AppListControllerDelegateAthena::PinApp(const std::string
& extension_id
) {
47 void AppListControllerDelegateAthena::UnpinApp(
48 const std::string
& extension_id
) {
52 AppListControllerDelegate::Pinnable
53 AppListControllerDelegateAthena::GetPinnable() {
57 void AppListControllerDelegateAthena::OnShowChildDialog() {
61 void AppListControllerDelegateAthena::OnCloseChildDialog() {
65 bool AppListControllerDelegateAthena::CanDoCreateShortcutsFlow() {
69 void AppListControllerDelegateAthena::DoCreateShortcutsFlow(
71 const std::string
& extension_id
) {
75 void AppListControllerDelegateAthena::CreateNewWindow(Profile
* profile
,
77 // Nothing needs to be done.
80 void AppListControllerDelegateAthena::OpenURL(
83 ui::PageTransition transition
,
84 WindowOpenDisposition disposition
) {
85 ActivityFactory::Get()->CreateWebActivity(profile
, base::string16(), url
);
88 void AppListControllerDelegateAthena::ActivateApp(
90 const extensions::Extension
* extension
,
93 LaunchApp(profile
, extension
, source
, event_flags
);
96 void AppListControllerDelegateAthena::LaunchApp(
98 const extensions::Extension
* extension
,
101 ExtensionsDelegate::Get(profile
)->LaunchApp(extension
->id());
104 void AppListControllerDelegateAthena::ShowForProfileByPath(
105 const base::FilePath
& profile_path
) {
106 // Ash doesn't have profile switching.
110 bool AppListControllerDelegateAthena::ShouldShowUserIcon() {
114 } // namespace athena