- add sources.
[platform/framework/web/crosswalk.git] / src / ui / app_list / test / app_list_test_view_delegate.h
1 // Copyright 2013 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.
4
5 #ifndef UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_
6 #define UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_
7
8 #include "base/callback_forward.h"
9 #include "base/compiler_specific.h"
10 #include "ui/app_list/app_list_view_delegate.h"
11
12 namespace app_list {
13 namespace test {
14
15 // A concrete AppListViewDelegate for unit tests.
16 class AppListTestViewDelegate  : public AppListViewDelegate {
17  public:
18   AppListTestViewDelegate();
19   virtual ~AppListTestViewDelegate();
20
21   int dismiss_count() { return dismiss_count_; }
22   void set_test_signin_delegate(SigninDelegate* signin_delegate) {
23     test_signin_delegate_ = signin_delegate;
24   }
25
26   // AppListViewDelegate overrides:
27   virtual bool ForceNativeDesktop() const OVERRIDE;
28   virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {}
29   virtual void InitModel(AppListModel* model) OVERRIDE {}
30   virtual SigninDelegate* GetSigninDelegate() OVERRIDE;
31   virtual void GetShortcutPathForApp(
32       const std::string& app_id,
33       const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
34   virtual void StartSearch() OVERRIDE {}
35   virtual void StopSearch() OVERRIDE {}
36   virtual void OpenSearchResult(SearchResult* result,
37                                 int event_flags) OVERRIDE {}
38   virtual void InvokeSearchResultAction(SearchResult* result,
39                                         int action_index,
40                                         int event_flags) OVERRIDE {}
41   virtual void Dismiss() OVERRIDE;
42   virtual void ViewClosing() OVERRIDE {}
43   virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
44   virtual void OpenSettings() OVERRIDE {}
45   virtual void OpenHelp() OVERRIDE {}
46   virtual void OpenFeedback() OVERRIDE {}
47   virtual void ShowForProfileByPath(
48       const base::FilePath& profile_path) OVERRIDE {};
49   virtual content::WebContents* GetStartPageContents() OVERRIDE;
50
51  private:
52   int dismiss_count_;
53   SigninDelegate* test_signin_delegate_;  // Weak. Owned by test.
54 };
55
56 }  // namespace test
57 }  // namespace app_list
58
59 #endif  // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_