Commit 827120bb authored by tfarina@chromium.org's avatar tfarina@chromium.org

app_list: Split app_list_controller.* into two smaller parts.

- One for AppListControllerDelegate class.
- Other for the AppList - Init/Show functions.

R=xiyuan@chromium.org
TBR=sky@chromium.org # for trivial include updates

Review URL: https://codereview.chromium.org/11834002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175961 0039d316-1c4b-4281-b951-d872f2087c98
parent b974d12e
......@@ -13,7 +13,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
......@@ -210,7 +210,7 @@ void ExtensionInstallUI::OpenAppInstalledUI(Browser* browser,
content::Details<const std::string>(&app_id));
} else {
#if defined(USE_ASH)
app_list_controller::ShowAppList();
chrome::ShowAppList();
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST,
......
......@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "base/logging.h"
#include "build/build_config.h"
AppListControllerDelegate::~AppListControllerDelegate() {}
......@@ -28,12 +27,3 @@ void AppListControllerDelegate::ShowCreateShortcutsDialog(
void AppListControllerDelegate::CreateNewWindow(bool incognito) {
NOTREACHED();
}
namespace app_list_controller {
#if defined(OS_CHROMEOS)
// Default implementation for ports which do not have this implemented.
void InitAppList() {}
#endif
} // namespace app_list_controller
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_H_
#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_H_
#ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
#include <string>
......@@ -55,14 +55,4 @@ class AppListControllerDelegate {
int event_flags) = 0;
};
namespace app_list_controller {
// Do any once off initialization needed for the app list.
void InitAppList();
// Show the app list.
void ShowAppList();
} // namespace app_list_controller
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_H_
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/app_list_util.h"
#include "build/build_config.h"
namespace chrome {
#if defined(OS_CHROMEOS)
// Default implementation for ports which do not have this implemented.
void InitAppList() {}
#endif
} // namespace chrome
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_UTIL_H_
#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_UTIL_H_
namespace chrome {
// Do any once off initialization needed for the app list.
void InitAppList();
// Show the app list.
void ShowAppList();
} // namespace chrome
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_UTIL_H_
......@@ -5,6 +5,7 @@
#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/app_list/apps_model_builder.h"
#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
#include "chrome/browser/ui/app_list/search_builder.h"
......
......@@ -10,9 +10,9 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "ui/app_list/app_list_view_delegate.h"
class AppListControllerDelegate;
class AppsModelBuilder;
class SearchBuilder;
......
......@@ -15,7 +15,7 @@
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_tabstrip.h"
......
......@@ -19,7 +19,7 @@
#include "chrome/browser/extensions/extension_icon_image.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_tabstrip.h"
......
......@@ -5,6 +5,7 @@
#include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
#include "ash/shell.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
AppListControllerDelegateAsh::AppListControllerDelegateAsh() {}
......@@ -59,7 +60,7 @@ void AppListControllerDelegateAsh::LaunchApp(Profile* profile,
DismissView();
}
namespace app_list_controller {
namespace chrome {
#if defined(OS_CHROMEOS)
void ShowAppList() {
......@@ -67,4 +68,4 @@ void ShowAppList() {
}
#endif
}
} // namespace chrome
......@@ -5,11 +5,9 @@
#ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_ASH_H_
#define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_ASH_H_
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
class AppListControllerDelegateAsh : public AppListControllerDelegate {
public:
......
......@@ -105,7 +105,7 @@
#endif
#if defined(ENABLE_APP_LIST)
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
#endif
using content::ChildProcessSecurityPolicy;
......@@ -336,9 +336,9 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile,
base::StatisticsRecorder::set_dump_on_exit(true);
#if defined(ENABLE_APP_LIST)
app_list_controller::InitAppList();
chrome::InitAppList();
if (command_line_.HasSwitch(switches::kShowAppList)) {
app_list_controller::ShowAppList();
chrome::ShowAppList();
return true;
}
#endif
......
......@@ -20,7 +20,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/app_list/app_list_controller.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
......@@ -494,7 +495,7 @@ void CreateAppList() {
} // namespace
namespace app_list_controller {
namespace chrome {
void InitAppList() {
// Check that the presence of the app list shortcut matches the flag
......@@ -527,4 +528,4 @@ void ShowAppList() {
g_app_list_controller.Get().ShowAppList();
}
} // namespace app_list_controller
} // namespace chrome
......@@ -96,8 +96,10 @@
'browser/ui/android/tab_restore_service_delegate_android.cc',
'browser/ui/android/window_android_helper.cc',
'browser/ui/android/window_android_helper.h',
'browser/ui/app_list/app_list_controller.h',
'browser/ui/app_list/app_list_controller.cc',
'browser/ui/app_list/app_list_controller_delegate.cc',
'browser/ui/app_list/app_list_controller_delegate.h',
'browser/ui/app_list/app_list_util.cc',
'browser/ui/app_list/app_list_util.h',
'browser/ui/app_list/app_list_view_delegate.cc',
'browser/ui/app_list/app_list_view_delegate.h',
'browser/ui/app_list/apps_model_builder.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment