| 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 ash::ShelfItemDelegate::PerformedAction Activate( | 264 ash::ShelfAction ItemSelected(ui::EventType event_type, |
| 265 ash::LaunchSource source) override { | 265 int event_flags, |
| 266 return kExistingWindowActivated; | 266 int64_t display_id, |
| 267 } | 267 ash::ShelfLaunchSource source) override { |
| 268 ash::ShelfItemDelegate::PerformedAction ItemSelected( | 268 return ash::kExistingWindowActivated; |
| 269 const ui::Event& event) override { | |
| 270 return kExistingWindowActivated; | |
| 271 } | 269 } |
| 272 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { | 270 ash::ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { |
| 273 ash::ShelfAppMenuItemList items; | 271 ash::ShelfAppMenuItemList items; |
| 274 items.push_back( | 272 items.push_back( |
| 275 base::MakeUnique<ash::ShelfApplicationMenuItem>(base::string16())); | 273 base::MakeUnique<ash::ShelfApplicationMenuItem>(base::string16())); |
| 276 items.push_back( | 274 items.push_back( |
| 277 base::MakeUnique<ash::ShelfApplicationMenuItem>(base::string16())); | 275 base::MakeUnique<ash::ShelfApplicationMenuItem>(base::string16())); |
| 278 return items; | 276 return items; |
| 279 } | 277 } |
| 280 void Close() override {} | 278 void Close() override {} |
| (...skipping 3930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4211 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 4209 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
| 4212 shelf_controller->auto_hide()); | 4210 shelf_controller->auto_hide()); |
| 4213 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); | 4211 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); |
| 4214 | 4212 |
| 4215 PrefService* prefs = profile()->GetTestingPrefService(); | 4213 PrefService* prefs = profile()->GetTestingPrefService(); |
| 4216 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); | 4214 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); |
| 4217 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); | 4215 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); |
| 4218 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); | 4216 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); |
| 4219 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); | 4217 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); |
| 4220 } | 4218 } |
| OLD | NEW |