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

Unified Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 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/app_list/app_list_presenter_delegate.cc
diff --git a/ash/app_list/app_list_presenter_delegate.cc b/ash/app_list/app_list_presenter_delegate.cc
index 3da5543856148ff187270fe4917656d507f4a7e2..f8c94450842d06eae0ba5d52735a3dc0eb0323fa 100644
--- a/ash/app_list/app_list_presenter_delegate.cc
+++ b/ash/app_list/app_list_presenter_delegate.cc
@@ -8,10 +8,12 @@
#include "ash/common/ash_switches.h"
#include "ash/common/shelf/app_list_button.h"
#include "ash/common/shelf/shelf_types.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/wm_screen_util.h"
#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/display/window_tree_host_manager.h"
@@ -142,7 +144,7 @@ AppListPresenterDelegate::~AppListPresenterDelegate() {
keyboard_controller->RemoveObserver(this);
Shell::GetInstance()->RemovePreTargetHandler(this);
WmWindow* window = WmLookup::Get()->GetWindowForWidget(view_->GetWidget());
- Shelf::ForWindow(window)->RemoveIconObserver(this);
+ window->GetRootWindowController()->GetShelf()->RemoveObserver(this);
WmShell::Get()->RemoveShellObserver(this);
}
@@ -204,7 +206,8 @@ void AppListPresenterDelegate::Init(app_list::AppListView* view,
if (keyboard_controller)
keyboard_controller->AddObserver(this);
Shell::GetInstance()->AddPreTargetHandler(this);
- shelf->AddIconObserver(this);
+ WmWindow* window = WmShell::Get()->GetRootWindowForDisplayId(display_id);
+ window->GetRootWindowController()->GetShelf()->AddObserver(this);
// By setting us as DnD recipient, the app list knows that we can
// handle items.
@@ -352,7 +355,7 @@ void AppListPresenterDelegate::OnMaximizeModeEnded() {
}
////////////////////////////////////////////////////////////////////////////////
-// AppListPresenterDelegate, ShelfIconObserver implementation:
+// AppListPresenterDelegate, WmShelfObserver implementation:
void AppListPresenterDelegate::OnShelfIconPositionsChanged() {
UpdateBounds();
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.h ('k') | ash/ash.gyp » ('j') | ash/ash.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698