| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // Test implementation of a V2 app launcher item controller. | 254 // Test implementation of a V2 app launcher item controller. |
| 255 class TestV2AppLauncherItemController : public LauncherItemController { | 255 class TestV2AppLauncherItemController : public LauncherItemController { |
| 256 public: | 256 public: |
| 257 TestV2AppLauncherItemController(const std::string& app_id, | 257 TestV2AppLauncherItemController(const std::string& app_id, |
| 258 ChromeLauncherController* controller) | 258 ChromeLauncherController* controller) |
| 259 : LauncherItemController(app_id, std::string(), controller) {} | 259 : LauncherItemController(app_id, std::string(), controller) {} |
| 260 | 260 |
| 261 ~TestV2AppLauncherItemController() override {} | 261 ~TestV2AppLauncherItemController() override {} |
| 262 | 262 |
| 263 // Override for LauncherItemController: | 263 // Override for LauncherItemController: |
| 264 void Launch(ash::LaunchSource source, int event_flags) override {} | |
| 265 ash::ShelfItemDelegate::PerformedAction Activate( | 264 ash::ShelfItemDelegate::PerformedAction Activate( |
| 266 ash::LaunchSource source) override { | 265 ash::LaunchSource source) override { |
| 267 return kExistingWindowActivated; | 266 return kExistingWindowActivated; |
| 268 } | 267 } |
| 269 ash::ShelfItemDelegate::PerformedAction ItemSelected( | 268 ash::ShelfItemDelegate::PerformedAction ItemSelected( |
| 270 const ui::Event& event) override { | 269 const ui::Event& event) override { |
| 271 return kExistingWindowActivated; | 270 return kExistingWindowActivated; |
| 272 } | 271 } |
| 273 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { | 272 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { |
| 274 ash::ShelfAppMenuItemList items; | 273 ash::ShelfAppMenuItemList items; |
| (...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4213 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 4212 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
| 4214 shelf_controller->auto_hide()); | 4213 shelf_controller->auto_hide()); |
| 4215 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); | 4214 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); |
| 4216 | 4215 |
| 4217 PrefService* prefs = profile()->GetTestingPrefService(); | 4216 PrefService* prefs = profile()->GetTestingPrefService(); |
| 4218 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); | 4217 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); |
| 4219 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); | 4218 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); |
| 4220 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); | 4219 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); |
| 4221 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); | 4220 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); |
| 4222 } | 4221 } |
| OLD | NEW |