Move Webstore URL concepts to //extensions and out
[chromium-blink-merge.git] / chrome / browser / ui / app_list / app_list_service_views.h
blob74f585a33227d673cf0aa741fd8d0ae28250ce1f
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 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
10 #include "chrome/browser/ui/app_list/app_list_shower_delegate.h"
11 #include "chrome/browser/ui/app_list/app_list_shower_views.h"
13 class AppListControllerDelegate;
15 // AppListServiceViews manages a desktop app list that uses toolkit-views.
16 class AppListServiceViews : public AppListServiceImpl,
17 public AppListShowerDelegate {
18 public:
19 explicit AppListServiceViews(
20 scoped_ptr<AppListControllerDelegate> controller_delegate);
21 virtual ~AppListServiceViews();
23 // Set |can_dismiss| to prevent the app list dismissing when losing focus. For
24 // example, while showing a window-modal dialog.
25 void set_can_dismiss(bool can_dismiss) { can_dismiss_ = can_dismiss; }
27 AppListShower& shower() { return shower_; }
29 // Called by the AppListControllerDelegate when it is told that the app list
30 // view must be destroyed.
31 virtual void OnViewBeingDestroyed();
33 // AppListService overrides:
34 virtual void Init(Profile* initial_profile) OVERRIDE;
35 virtual void CreateForProfile(Profile* requested_profile) OVERRIDE;
36 virtual void ShowForProfile(Profile* requested_profile) OVERRIDE;
37 virtual void DismissAppList() OVERRIDE;
38 virtual bool IsAppListVisible() const OVERRIDE;
39 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE;
40 virtual Profile* GetCurrentAppListProfile() OVERRIDE;
41 virtual AppListControllerDelegate* GetControllerDelegate() OVERRIDE;
43 // AppListServiceImpl overrides:
44 virtual void DestroyAppList() OVERRIDE;
46 // AppListShowerDelegate overrides:
47 virtual AppListControllerDelegate* GetControllerDelegateForCreate() OVERRIDE;
49 private:
50 // Responsible for creating the app list and responding to profile changes.
51 AppListShower shower_;
53 bool can_dismiss_;
54 scoped_ptr<AppListControllerDelegate> controller_delegate_;
56 DISALLOW_COPY_AND_ASSIGN(AppListServiceViews);
59 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_