Chromium Code Reviews| Index: chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h |
| diff --git a/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h b/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e22a3dda9de021e499bcf4844a5b0d9e47a9cd8 |
| --- /dev/null |
| +++ b/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |
| +#define CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |
| + |
| +#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" |
| +#include "chrome/browser/ui/toolbar/toolbar_actions_model.h" |
| + |
| +class Browser; |
| + |
| +// Mock class used to substitute ComponentToolbarActionsFactory in tests. |
| +class MockComponentToolbarActionsFactory |
| + : public ComponentToolbarActionsFactory { |
| + public: |
| + explicit MockComponentToolbarActionsFactory(Browser* browser); |
| + ~MockComponentToolbarActionsFactory() override; |
| + |
| + // ComponentToolbarActionsFactory: |
| + ScopedVector<ToolbarActionViewController> |
| + GetComponentToolbarActions(Browser* browser) override; |
| + |
| + const ActionIds action_ids() const { return action_ids_; } |
|
Devlin
2015/08/13 21:21:10
why not const&?
apacible
2015/08/15 08:46:41
Done.
|
| + |
| + private: |
| + ActionIds action_ids_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MockComponentToolbarActionsFactory); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |