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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash/shelf/shelf_widget.cc for browser_tests crash... Created 4 years, 10 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: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 3a0c7f4a0734119a03429cded5ab83e6cf17fcad..03c840ba1e0e11d55a5788238e7909b097de298e 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -16,7 +16,6 @@
#include "ash/shelf/shelf_item_delegate_manager.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/wm/window_util.h"
@@ -504,10 +503,8 @@ ChromeLauncherController::~ChromeLauncherController() {
// Reset the app window controller here since it has a weak pointer to this.
app_window_controller_.reset();
- for (std::set<ash::Shelf*>::iterator iter = shelves_.begin();
- iter != shelves_.end();
- ++iter)
- (*iter)->shelf_widget()->shelf_layout_manager()->RemoveObserver(this);
+ for (auto iter : shelves_)
+ iter->shelf_layout_manager()->RemoveObserver(this);
model_->RemoveObserver(this);
if (ash::Shell::HasInstance())
@@ -1170,7 +1167,7 @@ ChromeLauncherController::ActivateWindowOrMinimizeIfActive(
void ChromeLauncherController::OnShelfCreated(ash::Shelf* shelf) {
shelves_.insert(shelf);
- shelf->shelf_widget()->shelf_layout_manager()->AddObserver(this);
+ shelf->shelf_layout_manager()->AddObserver(this);
}
void ChromeLauncherController::OnShelfDestroyed(ash::Shelf* shelf) {
« no previous file with comments | « chrome/browser/chromeos/accessibility/chromevox_panel.cc ('k') | chrome/browser/ui/ash/shelf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698