Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5896)

Unified Diff: chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h

Issue 1241063003: Support Component Actions in the toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..cf663dc0221b0e87b8add474ee84d2cdec326ad6
--- /dev/null
+++ b/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h
@@ -0,0 +1,33 @@
+// 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_; }
+
+ private:
+ // All the action ids.
Peter Kasting 2015/08/11 19:10:49 Nit: This comment adds nothing to the code. Only
apacible 2015/08/12 05:26:44 Removed.
+ ActionIds action_ids_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockComponentToolbarActionsFactory);
+};
+
+#endif // CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698