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

Unified Diff: trunk/src/ash/shell.cc

Issue 25716004: Revert 226547 "Refactor LauncherItemController and LauncherItemD..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 | « trunk/src/ash/shell.h ('k') | trunk/src/ash/shell/launcher_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/shell.cc
===================================================================
--- trunk/src/ash/shell.cc (revision 226578)
+++ trunk/src/ash/shell.cc (working copy)
@@ -38,7 +38,6 @@
#include "ash/session_state_delegate.h"
#include "ash/shelf/app_list_shelf_item_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell_delegate.h"
#include "ash/shell_factory.h"
@@ -262,9 +261,6 @@
user_action_client_.reset();
visibility_controller_.reset();
launcher_delegate_.reset();
- // |launcher_item_delegate_manager_| observes |launcher_model_|. It must be
- // destroyed before |launcher_model_| is destroyed.
- launcher_item_delegate_manager_.reset();
launcher_model_.reset();
video_detector_.reset();
@@ -821,28 +817,13 @@
LauncherDelegate* Shell::GetLauncherDelegate() {
if (!launcher_delegate_) {
- launcher_model_.reset(new LauncherModel);
// Creates LauncherItemDelegateManager before LauncherDelegate.
- launcher_item_delegate_manager_.reset(
- new LauncherItemDelegateManager(launcher_model_.get()));
-
+ launcher_item_delegate_manager_.reset(new LauncherItemDelegateManager);
+ launcher_model_.reset(new LauncherModel);
launcher_delegate_.reset(
delegate_->CreateLauncherDelegate(launcher_model_.get()));
- scoped_ptr<LauncherItemDelegate> controller(
+ app_list_shelf_item_delegate_.reset(
new internal::AppListShelfItemDelegate);
-
- ash::LauncherID app_list_id = 0;
- // TODO(simon.hong81): Make function for this in shelf_util.h
- for (size_t i = 0; i < launcher_model_->items().size(); ++i) {
- if (launcher_model_->items()[i].type == ash::TYPE_APP_LIST) {
- app_list_id = launcher_model_->items()[i].id;
- break;
- }
- }
- DCHECK(app_list_id);
- launcher_item_delegate_manager_->SetLauncherItemDelegate(
- app_list_id,
- controller.Pass());
}
return launcher_delegate_.get();
}
« no previous file with comments | « trunk/src/ash/shell.h ('k') | trunk/src/ash/shell/launcher_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698