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.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 virtual void ItemSelected(const ui::Event& event) OVERRIDE {} | 226 virtual void ItemSelected(const ui::Event& event) OVERRIDE {} |
227 virtual string16 GetTitle() OVERRIDE { return string16(); } | 227 virtual string16 GetTitle() OVERRIDE { return string16(); } |
228 virtual ChromeLauncherAppMenuItems GetApplicationList( | 228 virtual ChromeLauncherAppMenuItems GetApplicationList( |
229 int event_flags) OVERRIDE { | 229 int event_flags) OVERRIDE { |
230 ChromeLauncherAppMenuItems items; | 230 ChromeLauncherAppMenuItems items; |
231 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); | 231 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); |
232 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); | 232 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); |
233 return items.Pass(); | 233 return items.Pass(); |
234 } | 234 } |
235 virtual ui::MenuModel* CreateContextMenu( | 235 virtual ui::MenuModel* CreateContextMenu( |
236 aura::RootWindow* root_window) OVERRIDE { return NULL; } | 236 aura::Window* root_window) OVERRIDE { return NULL; } |
237 virtual ash::LauncherMenuModel* CreateApplicationMenu( | 237 virtual ash::LauncherMenuModel* CreateApplicationMenu( |
238 int event_flags) OVERRIDE { return NULL; } | 238 int event_flags) OVERRIDE { return NULL; } |
239 virtual bool IsDraggable() OVERRIDE { return false; } | 239 virtual bool IsDraggable() OVERRIDE { return false; } |
240 virtual bool ShouldShowTooltip() OVERRIDE { return false; } | 240 virtual bool ShouldShowTooltip() OVERRIDE { return false; } |
241 | 241 |
242 private: | 242 private: |
243 | 243 |
244 DISALLOW_COPY_AND_ASSIGN(TestV2AppLauncherItemController); | 244 DISALLOW_COPY_AND_ASSIGN(TestV2AppLauncherItemController); |
245 }; | 245 }; |
246 | 246 |
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2269 | 2269 |
2270 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2270 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2271 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2271 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2272 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2272 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2273 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2273 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2274 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2274 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2275 | 2275 |
2276 launcher_controller_->UnpinAppWithID("1"); | 2276 launcher_controller_->UnpinAppWithID("1"); |
2277 ASSERT_EQ(initial_size, model_->items().size()); | 2277 ASSERT_EQ(initial_size, model_->items().size()); |
2278 } | 2278 } |
OLD | NEW |