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

Unified Diff: ash/launcher/ash_launcher_delegate.cc

Issue 22429004: Refactor LauncherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some comments 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.cc
diff --git a/ash/launcher/ash_launcher_delegate.cc b/ash/launcher/ash_launcher_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ef64ee77ce89a6ea39522c0ca11e25a6bd792f6c
--- /dev/null
+++ b/ash/launcher/ash_launcher_delegate.cc
@@ -0,0 +1,62 @@
+// 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.
+
+#include "ash/launcher/ash_launcher_delegate.h"
+
+#include "ash/launcher/app_list_launcher_item_delegate.h"
+#include "ash/launcher/launcher_item_delegate.h"
+
+namespace ash {
+namespace internal {
+
+AshLauncherDelegate::AshLauncherDelegate() {
+ app_list_item_delegate_.reset(new AppListLauncherItemDelegate);
+}
+
+AshLauncherDelegate::~AshLauncherDelegate() {}
+
+LauncherID AshLauncherDelegate::GetIDByWindow(aura::Window* window) {
+ return 0;
+}
+
+void AshLauncherDelegate::OnLauncherCreated(Launcher* launcher) {
+ // Do nothing.
+}
+
+void AshLauncherDelegate::OnLauncherDestroyed(Launcher* launcher) {
+ // Do nothing.
+}
+
+LauncherID AshLauncherDelegate::GetLauncherIDForAppID(
+ const std::string& app_id) {
+ NOTREACHED();
+ return 0;
+}
+
+void AshLauncherDelegate::PinAppWithID(const std::string& app_id) {
+ NOTREACHED();
+ // Do nothing.
+}
+
+bool AshLauncherDelegate::IsAppPinned(const std::string& app_id) {
+ NOTREACHED();
+ return false;
+}
+
+void AshLauncherDelegate::UnpinAppsWithID(const std::string& app_id) {
+ NOTREACHED();
+ // Do nothing.
+}
+
+LauncherItemDelegate* AshLauncherDelegate::GetLauncherItemDelegate(
+ const LauncherItem& item) {
+ if (item.type == TYPE_APP_LIST)
+ return app_list_item_delegate_.get();
+
+ NOTREACHED();
+ return NULL;
+}
+
+} // namespace internal
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698