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

Unified Diff: ash/launcher/ash_launcher_delegate.h

Issue 22429004: Refactor LauncherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bugs Created 7 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: ash/launcher/ash_launcher_delegate.h
diff --git a/ash/launcher/ash_launcher_delegate.h b/ash/launcher/ash_launcher_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb90bf32d41835c9f79fba409b3a6c1164d676ae
--- /dev/null
+++ b/ash/launcher/ash_launcher_delegate.h
@@ -0,0 +1,44 @@
+// Copyright 2013 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_LAUNCHER_ASH_LAUNCHER_DELEGATE_H_
+#define ASH_LAUNCHER_ASH_LAUNCHER_DELEGATE_H_
+
+#include "ash/launcher/launcher_delegate.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+
+namespace ash {
+class Launcher;
+class LauncherItemDelegate;
+
+namespace internal {
+
+// LauncherDelegate in Ash.
Mr4D (OOO till 08-26) 2013/08/14 15:52:19 IF there is a reason to not follow my comment in a
simonhong_ 2013/08/14 23:47:51 The reason why I another LauncherDelegate in Ash i
Mr4D (OOO till 08-26) 2013/08/15 15:53:19 If it is only the one function you are interested
+class AshLauncherDelegate : public LauncherDelegate {
+ public:
+ AshLauncherDelegate();
+ virtual ~AshLauncherDelegate();
+
+ // ash::LauncherDelegate overrides;
+ virtual LauncherID GetIDByWindow(aura::Window* window) OVERRIDE;
+ virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE;
+ virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE;
+ virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE;
+ virtual void PinAppWithID(const std::string& app_id) OVERRIDE;
+ virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
+ virtual void UnpinAppsWithID(const std::string& app_id) OVERRIDE;
+ virtual LauncherItemDelegate* GetLauncherItemDelegate(
+ const LauncherItem& item) OVERRIDE;
+
+ private:
+ scoped_ptr<LauncherItemDelegate> app_list_item_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(AshLauncherDelegate);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_LAUNCHER_ASH_LAUNCHER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698