Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_unittest.cc

Issue 1137503005: Add launcherPage.hide() API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mobile Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_registry_simple.h" 8 #include "base/prefs/pref_registry_simple.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/pref_service_factory.h" 10 #include "base/prefs/pref_service_factory.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void CreateForProfile(Profile* requested_profile) override {} 51 void CreateForProfile(Profile* requested_profile) override {}
52 52
53 void ShowForProfile(Profile* requested_profile) override { 53 void ShowForProfile(Profile* requested_profile) override {
54 showing_for_profile_ = requested_profile; 54 showing_for_profile_ = requested_profile;
55 RecordAppListLaunch(); 55 RecordAppListLaunch();
56 } 56 }
57 57
58 void ShowForCustomLauncherPage(Profile* profile) override {} 58 void ShowForCustomLauncherPage(Profile* profile) override {}
59 void HideCustomLauncherPage() override {}
59 60
60 void DismissAppList() override { showing_for_profile_ = NULL; } 61 void DismissAppList() override { showing_for_profile_ = NULL; }
61 62
62 bool IsAppListVisible() const override { return !!showing_for_profile_; } 63 bool IsAppListVisible() const override { return !!showing_for_profile_; }
63 64
64 gfx::NativeWindow GetAppListWindow() override { return NULL; } 65 gfx::NativeWindow GetAppListWindow() override { return NULL; }
65 66
66 AppListControllerDelegate* GetControllerDelegate() override { return NULL; } 67 AppListControllerDelegate* GetControllerDelegate() override { return NULL; }
67 68
68 // AppListServiceImpl overrides: 69 // AppListServiceImpl overrides:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL, 237 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL,
237 local_state_->GetInteger(prefs::kAppListEnableMethod)); 238 local_state_->GetInteger(prefs::kAppListEnableMethod));
238 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime)); 239 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime));
239 240
240 // An auto-show here should update the enable method to prevent recording it 241 // An auto-show here should update the enable method to prevent recording it
241 // as ENABLE_FOR_APP_INSTALL. 242 // as ENABLE_FOR_APP_INSTALL.
242 service_->ShowForAppInstall(profile1_.get(), "", false); 243 service_->ShowForAppInstall(profile1_.get(), "", false);
243 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED, 244 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED,
244 local_state_->GetInteger(prefs::kAppListEnableMethod)); 245 local_state_->GetInteger(prefs::kAppListEnableMethod));
245 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/ui/app_list/app_list_service_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698