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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 virtual ~TestV2AppLauncherItemController() {} | 219 virtual ~TestV2AppLauncherItemController() {} |
220 | 220 |
221 // Override for LauncherItemController: | 221 // Override for LauncherItemController: |
222 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE { | 222 virtual bool IsCurrentlyShownInWindow(aura::Window* window) const OVERRIDE { |
223 return true; | 223 return true; |
224 } | 224 } |
225 virtual bool IsOpen() const OVERRIDE { return true; } | 225 virtual bool IsOpen() const OVERRIDE { return true; } |
226 virtual bool IsVisible() const OVERRIDE { return true; } | 226 virtual bool IsVisible() const OVERRIDE { return true; } |
227 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE {} | 227 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE {} |
228 virtual void Activate(ash::LaunchSource source) OVERRIDE {} | 228 virtual bool Activate(ash::LaunchSource source) OVERRIDE { return false; } |
229 virtual void Close() OVERRIDE {} | 229 virtual void Close() OVERRIDE {} |
230 virtual void ItemSelected(const ui::Event& event) OVERRIDE {} | 230 virtual bool ItemSelected(const ui::Event& event) OVERRIDE { return false; } |
231 virtual string16 GetTitle() OVERRIDE { return string16(); } | 231 virtual string16 GetTitle() OVERRIDE { return string16(); } |
232 virtual ChromeLauncherAppMenuItems GetApplicationList( | 232 virtual ChromeLauncherAppMenuItems GetApplicationList( |
233 int event_flags) OVERRIDE { | 233 int event_flags) OVERRIDE { |
234 ChromeLauncherAppMenuItems items; | 234 ChromeLauncherAppMenuItems items; |
235 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); | 235 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); |
236 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); | 236 items.push_back(new ChromeLauncherAppMenuItem(string16(), NULL, false)); |
237 return items.Pass(); | 237 return items.Pass(); |
238 } | 238 } |
239 virtual ui::MenuModel* CreateContextMenu( | 239 virtual ui::MenuModel* CreateContextMenu( |
240 aura::Window* root_window) OVERRIDE { return NULL; } | 240 aura::Window* root_window) OVERRIDE { return NULL; } |
(...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 | 2431 |
2432 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2432 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2433 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2433 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2434 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2434 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2435 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2435 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2436 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2436 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2437 | 2437 |
2438 launcher_controller_->UnpinAppWithID("1"); | 2438 launcher_controller_->UnpinAppWithID("1"); |
2439 ASSERT_EQ(initial_size, model_->items().size()); | 2439 ASSERT_EQ(initial_size, model_->items().size()); |
2440 } | 2440 } |
OLD | NEW |