From 25fc4e8f94f8279264116e32a9cc5361170154fc Mon Sep 17 00:00:00 2001 From: msw Date: Thu, 17 Mar 2016 17:13:09 -0700 Subject: Remove unused ShelfModelObserver::ShelfStatusChanged() BUG=NONE TEST=NONE R=sky@chromium.org Review URL: https://codereview.chromium.org/1811203002 Cr-Commit-Position: refs/heads/master@{#381842} --- ash/shelf/shelf_item_delegate_manager.cc | 12 +++--------- ash/shelf/shelf_item_delegate_manager.h | 1 - ash/shelf/shelf_model.cc | 8 -------- ash/shelf/shelf_model.h | 2 +- ash/shelf/shelf_model_observer.h | 3 --- ash/shelf/shelf_model_unittest.cc | 1 - ash/shelf/shelf_view.cc | 4 ---- ash/shelf/shelf_view.h | 1 - 8 files changed, 4 insertions(+), 28 deletions(-) (limited to 'ash') diff --git a/ash/shelf/shelf_item_delegate_manager.cc b/ash/shelf/shelf_item_delegate_manager.cc index 256ee67..5f988e2 100644 --- a/ash/shelf/shelf_item_delegate_manager.cc +++ b/ash/shelf/shelf_item_delegate_manager.cc @@ -58,8 +58,7 @@ ShelfItemDelegate* ShelfItemDelegateManager::GetShelfItemDelegate(ShelfID id) { return NULL; } -void ShelfItemDelegateManager::ShelfItemAdded(int index) { -} +void ShelfItemDelegateManager::ShelfItemAdded(int index) {} void ShelfItemDelegateManager::ShelfItemRemoved(int index, ShelfID id) { RemoveShelfItemDelegate(id); @@ -69,15 +68,10 @@ void ShelfItemDelegateManager::ShelfItemRemoved(int index, ShelfID id) { } void ShelfItemDelegateManager::ShelfItemMoved(int start_index, - int target_index) { -} + int target_index) {} void ShelfItemDelegateManager::ShelfItemChanged(int index, - const ShelfItem& old_item) { -} - -void ShelfItemDelegateManager::ShelfStatusChanged() { -} + const ShelfItem& old_item) {} void ShelfItemDelegateManager::RemoveShelfItemDelegate(ShelfID id) { if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) { diff --git a/ash/shelf/shelf_item_delegate_manager.h b/ash/shelf/shelf_item_delegate_manager.h index b406677..054e135 100644 --- a/ash/shelf/shelf_item_delegate_manager.h +++ b/ash/shelf/shelf_item_delegate_manager.h @@ -61,7 +61,6 @@ class ASH_EXPORT ShelfItemDelegateManager : public ShelfModelObserver { void ShelfItemRemoved(int index, ShelfID id) override; void ShelfItemMoved(int start_index, int targetindex) override; void ShelfItemChanged(int index, const ShelfItem& old_item) override; - void ShelfStatusChanged() override; private: friend class test::ShelfItemDelegateManagerTestAPI; diff --git a/ash/shelf/shelf_model.cc b/ash/shelf/shelf_model.cc index e04af42..1952cd5 100644 --- a/ash/shelf/shelf_model.cc +++ b/ash/shelf/shelf_model.cc @@ -150,14 +150,6 @@ int ShelfModel::FirstPanelIndex() const { CompareByWeight) - items_.begin(); } -void ShelfModel::SetStatus(Status status) { - if (status_ == status) - return; - - status_ = status; - FOR_EACH_OBSERVER(ShelfModelObserver, observers_, ShelfStatusChanged()); -} - void ShelfModel::AddObserver(ShelfModelObserver* observer) { observers_.AddObserver(observer); } diff --git a/ash/shelf/shelf_model.h b/ash/shelf/shelf_model.h index 01ab2a92..1f29124 100644 --- a/ash/shelf/shelf_model.h +++ b/ash/shelf/shelf_model.h @@ -74,7 +74,7 @@ class ASH_EXPORT ShelfModel { const ShelfItems& items() const { return items_; } int item_count() const { return static_cast(items_.size()); } - void SetStatus(Status status); + void set_status(Status status) { status_ = status; } Status status() const { return status_; } void AddObserver(ShelfModelObserver* observer); diff --git a/ash/shelf/shelf_model_observer.h b/ash/shelf/shelf_model_observer.h index a65e5cf..16ee21c 100644 --- a/ash/shelf/shelf_model_observer.h +++ b/ash/shelf/shelf_model_observer.h @@ -29,9 +29,6 @@ class ASH_EXPORT ShelfModelObserver { // before the change. virtual void ShelfItemChanged(int index, const ShelfItem& old_item) = 0; - // Invoked when shelf status is changed. - virtual void ShelfStatusChanged() = 0; - protected: virtual ~ShelfModelObserver() {} }; diff --git a/ash/shelf/shelf_model_unittest.cc b/ash/shelf/shelf_model_unittest.cc index 929fd10..05fea6d 100644 --- a/ash/shelf/shelf_model_unittest.cc +++ b/ash/shelf/shelf_model_unittest.cc @@ -48,7 +48,6 @@ class TestShelfModelObserver : public ShelfModelObserver { void ShelfItemMoved(int start_index, int target_index) override { moved_count_++; } - void ShelfStatusChanged() override {} private: void AddToResult(const std::string& format, int count, std::string* result) { diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc index 1217e74..9088f6c 100644 --- a/ash/shelf/shelf_view.cc +++ b/ash/shelf/shelf_view.cc @@ -1586,10 +1586,6 @@ void ShelfView::ShelfItemMoved(int start_index, int target_index) { AnimateToIdealBounds(); } -void ShelfView::ShelfStatusChanged() { - // Nothing to do here. -} - void ShelfView::PointerPressedOnButton(views::View* view, Pointer pointer, const ui::LocatedEvent& event) { diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h index 4b37d39..ccfb1f4 100644 --- a/ash/shelf/shelf_view.h +++ b/ash/shelf/shelf_view.h @@ -255,7 +255,6 @@ class ASH_EXPORT ShelfView : public views::View, void ShelfItemRemoved(int model_index, ShelfID id) override; void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; void ShelfItemMoved(int start_index, int target_index) override; - void ShelfStatusChanged() override; // Overridden from ShelfButtonHost: void PointerPressedOnButton(views::View* view, -- cgit v1.1