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

Unified Diff: ash/test/test_launcher_delegate.h

Issue 10142005: Revert 133089 - Implement LauncherIconObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_launcher_delegate.h
===================================================================
--- ash/test/test_launcher_delegate.h (revision 133102)
+++ ash/test/test_launcher_delegate.h (working copy)
@@ -1,69 +0,0 @@
-// 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 <set>
-
-#include "ash/launcher/launcher_delegate.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/window_observer.h"
-
-namespace ash {
-
-class LauncherModel;
-
-namespace test {
-
-// Test implementation of LauncherDelegate.
-// Tests may create icons for windows by calling AddLauncherItem
-class TestLauncherDelegate : public LauncherDelegate,
- public aura::WindowObserver {
- public:
- explicit TestLauncherDelegate(LauncherModel* model);
- ~TestLauncherDelegate();
-
- void AddLauncherItem(aura::Window* window);
-
- static TestLauncherDelegate* instance() { return instance_; }
-
- // WindowObserver implementation
- void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
-
- // LauncherDelegate implementation.
- virtual void CreateNewTab() OVERRIDE;
- 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;
-
- private:
- typedef std::map<aura::Window*, ash::LauncherID> WindowToID;
- typedef std::set<aura::Window*> ObservedWindows;
-
- static TestLauncherDelegate* instance_;
-
- aura::Window* GetWindowByID(ash::LauncherID id);
-
- LauncherModel* model_;
-
- // Maps from window to the id we gave it.
- WindowToID window_to_id_;
-
- // Parent windows we are watching.
- ObservedWindows observed_windows_;
-
- DISALLOW_COPY_AND_ASSIGN(TestLauncherDelegate);
-};
-
-} // namespace test
-} // namespace ash
-
-#endif // ASH_TEST_TEST_LAUNCHER_DELEGATE
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698