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

Unified Diff: ash/shelf/shelf_window_watcher.cc

Issue 97983003: Start the move of launcher_types.h to shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: the rename Created 7 years 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 | « ash/shelf/shelf_widget.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_window_watcher.cc
diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc
index f2973151b27b7ed379d46a964f62773595de2a46..9766f54b5d5a3615e1ad0b2a3cea89e1c7a24adf 100644
--- a/ash/shelf/shelf_window_watcher.cc
+++ b/ash/shelf/shelf_window_watcher.cc
@@ -5,6 +5,7 @@
#include "ash/shelf/shelf_window_watcher.h"
#include "ash/display/display_controller.h"
+#include "ash/shelf/shelf_constants.h"
#include "ash/shelf/shelf_item_delegate_manager.h"
#include "ash/shelf/shelf_model.h"
#include "ash/shelf/shelf_util.h"
@@ -35,7 +36,7 @@ void SetShelfItemDetailsForLauncherItem(
// Returns true if |window| has a LauncherItem added by ShelfWindowWatcher.
bool HasLauncherItemForWindow(aura::Window* window) {
if (ash::GetLauncherItemDetailsForWindow(window) != NULL &&
- ash::GetLauncherIDForWindow(window) != ash::kInvalidLauncherID)
+ ash::GetLauncherIDForWindow(window) != ash::kInvalidShelfID)
return true;
return false;
}
@@ -98,7 +99,7 @@ void ShelfWindowWatcher::AddLauncherItem(aura::Window* window) {
void ShelfWindowWatcher::RemoveLauncherItem(aura::Window* window) {
model_->RemoveItemAt(model_->ItemIndexByID(GetLauncherIDForWindow(window)));
- SetLauncherIDForWindow(kInvalidLauncherID, window);
+ SetLauncherIDForWindow(kInvalidShelfID, window);
}
void ShelfWindowWatcher::OnRootWindowAdded(aura::Window* root_window) {
@@ -150,7 +151,7 @@ void ShelfWindowWatcher::OnWindowAdded(aura::Window* window) {
// Add LauncherItem if |window| already has a LauncherItemDetails when it is
// created. Don't make a new LauncherItem for the re-parented |window| that
// already has a LauncherItem.
- if (GetLauncherIDForWindow(window) == ash::kInvalidLauncherID &&
+ if (GetLauncherIDForWindow(window) == ash::kInvalidShelfID &&
GetLauncherItemDetailsForWindow(window))
AddLauncherItem(window);
}
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698