| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <map> | 5 #include <map> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <unordered_set> | 8 #include <unordered_set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 | 12 |
| 13 #include "chrome/browser/extensions/extension_util.h" | 13 #include "chrome/browser/extensions/extension_util.h" |
| 14 #include "chrome/browser/extensions/menu_manager_factory.h" | 14 #include "chrome/browser/extensions/menu_manager_factory.h" |
| 15 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h" | 15 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h" |
| 16 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 16 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 17 #include "chrome/browser/ui/app_list/app_list_test_util.h" | 17 #include "chrome/browser/ui/app_list/app_list_test_util.h" |
| 18 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" | 18 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" |
| 19 #include "chrome/browser/ui/app_list/extension_app_context_menu.h" | 19 #include "chrome/browser/ui/app_list/extension_app_context_menu.h" |
| 20 #include "chrome/browser/ui/app_list/test/test_app_list_controller_delegate.h" | 20 #include "chrome/browser/ui/app_list/test/test_app_list_controller_delegate.h" |
| 21 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
| 22 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
| 26 #include "chrome/browser/ui/app_list/arc/arc_app_item.h" | 26 #include "chrome/browser/ui/app_list/arc/arc_app_item.h" |
| 27 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 27 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 28 #include "chrome/browser/ui/app_list/arc/arc_app_test.h" | 28 #include "chrome/browser/ui/app_list/arc/arc_app_test.h" |
| 29 #include "components/arc/test/fake_app_instance.h" | 29 #include "components/arc/test/fake_app_instance.h" |
| 30 #include "components/arc/test/fake_arc_bridge_service.h" | |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 namespace { | 32 namespace { |
| 34 | 33 |
| 35 class FakeAppContextMenuDelegate : public app_list::AppContextMenuDelegate { | 34 class FakeAppContextMenuDelegate : public app_list::AppContextMenuDelegate { |
| 36 public: | 35 public: |
| 37 FakeAppContextMenuDelegate() = default; | 36 FakeAppContextMenuDelegate() = default; |
| 38 ~FakeAppContextMenuDelegate() override = default; | 37 ~FakeAppContextMenuDelegate() override = default; |
| 39 | 38 |
| 40 // app_list::AppContextMenuDelegate overrides: | 39 // app_list::AppContextMenuDelegate overrides: |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 ValidateItemState(menu, 0, MenuState(app_list::AppContextMenu::LAUNCH_NEW)); | 487 ValidateItemState(menu, 0, MenuState(app_list::AppContextMenu::LAUNCH_NEW)); |
| 489 ValidateItemState(menu, 1, MenuState()); // separator | 488 ValidateItemState(menu, 1, MenuState()); // separator |
| 490 ValidateItemState(menu, 2, MenuState(app_list::AppContextMenu::TOGGLE_PIN)); | 489 ValidateItemState(menu, 2, MenuState(app_list::AppContextMenu::TOGGLE_PIN)); |
| 491 ValidateItemState(menu, 3, MenuState()); // separator | 490 ValidateItemState(menu, 3, MenuState()); // separator |
| 492 ValidateItemState( | 491 ValidateItemState( |
| 493 menu, 4, MenuState(app_list::AppContextMenu::SHOW_APP_INFO)); | 492 menu, 4, MenuState(app_list::AppContextMenu::SHOW_APP_INFO)); |
| 494 } | 493 } |
| 495 } | 494 } |
| 496 | 495 |
| 497 #endif | 496 #endif |
| OLD | NEW |