OLD | NEW |
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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 return items; | 277 return items; |
278 } | 278 } |
279 ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override { | 279 ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override { |
280 return NULL; | 280 return NULL; |
281 } | 281 } |
282 bool IsDraggable() override { return false; } | 282 bool IsDraggable() override { return false; } |
283 bool CanPin() const override { | 283 bool CanPin() const override { |
284 return GetPinnableForAppID(app_id(), launcher_controller()->profile()) == | 284 return GetPinnableForAppID(app_id(), launcher_controller()->profile()) == |
285 AppListControllerDelegate::PIN_EDITABLE; | 285 AppListControllerDelegate::PIN_EDITABLE; |
286 } | 286 } |
287 bool ShouldShowTooltip() override { return false; } | |
288 | 287 |
289 private: | 288 private: |
290 DISALLOW_COPY_AND_ASSIGN(TestV2AppLauncherItemController); | 289 DISALLOW_COPY_AND_ASSIGN(TestV2AppLauncherItemController); |
291 }; | 290 }; |
292 | 291 |
293 } // namespace | 292 } // namespace |
294 | 293 |
295 class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest { | 294 class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest { |
296 protected: | 295 protected: |
297 ChromeLauncherControllerImplTest() | 296 ChromeLauncherControllerImplTest() |
(...skipping 3773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4071 | 4070 |
4072 // Pinned state should not change. | 4071 // Pinned state should not change. |
4073 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4072 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
4074 launcher_controller_->UnpinAppWithID(extension2_->id()); | 4073 launcher_controller_->UnpinAppWithID(extension2_->id()); |
4075 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); | 4074 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); |
4076 | 4075 |
4077 // Resume syncing and sync information overrides local copy. | 4076 // Resume syncing and sync information overrides local copy. |
4078 StartAppSyncService(copy_sync_list); | 4077 StartAppSyncService(copy_sync_list); |
4079 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4078 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
4080 } | 4079 } |
OLD | NEW |