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

Unified Diff: ash/test/test_launcher_delegate.h

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch with tests Created 8 years, 8 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: ash/test/test_launcher_delegate.h
diff --git a/ash/test/test_launcher_delegate.h b/ash/test/test_launcher_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ce4bebf3223922f864e0798e43713e4153c211b0
--- /dev/null
+++ b/ash/test/test_launcher_delegate.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2012 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 ASH_TEST_TEST_LAUNCHER_DELEGATE_H_
+#define ASH_TEST_TEST_LAUNCHER_DELEGATE_H_
+#pragma once
+
+#include <map>
+
+#include "ash/launcher/launcher_delegate.h"
+#include "base/compiler_specific.h"
+
+namespace ash {
+
+class LauncherModel;
+
+namespace test {
+
+class TestLauncherDelegate : public LauncherDelegate {
sky 2012/04/11 15:47:49 Add a description.
+ public:
+ TestLauncherDelegate(LauncherModel* model);
+
+ virtual void CreateNewTab() OVERRIDE;
sky 2012/04/11 15:47:49 Style for overriden methods is to prefix section w
+ virtual void CreateNewWindow() OVERRIDE;
+ virtual void ItemClicked(const LauncherItem& item) OVERRIDE;
+
+ virtual int GetBrowserShortcutResourceId() OVERRIDE;
+
+ virtual string16 GetTitle(const LauncherItem& item) OVERRIDE;
+
+ virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item) OVERRIDE;
+
+ virtual ui::MenuModel* CreateContextMenuForLauncher() OVERRIDE;
+
+ virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE;
+
+ void AddLauncherItem(aura::Window* window);
+ private:
sky 2012/04/11 15:47:49 nit: newline between 38/39.
+ LauncherModel* model_;
+
+ typedef std::map<aura::Window*, ash::LauncherID> WindowToID;
+
+ // Maps from window to the id we gave it.
+ WindowToID window_to_id_;
+};
sky 2012/04/11 15:47:49 DISALLOW_COPY_AND_ASSIGN
+
+} // namespace test
+} // namespace ash
+
+#endif // ASH_TEST_TEST_LAUNCHER_DELEGATE

Powered by Google App Engine
This is Rietveld 408576698