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

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

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Refine init pattern; add AppList item in ShelfModel ctor. Created 3 years, 7 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.h
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index 33d3ba664464dd53934b226f0a580ed9bdfb8ca7..bb4131ceea0b7ac10c47ec501ede35127fac101f 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -26,6 +26,8 @@
#include "components/prefs/pref_change_registrar.h"
#include "components/sync_preferences/pref_service_syncable_observer.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
class AccountId;
class AppIconLoader;
@@ -356,12 +358,21 @@ class ChromeLauncherController
int64_t display_id) override;
void OnAutoHideBehaviorChanged(ash::ShelfAutoHideBehavior auto_hide,
int64_t display_id) override;
+ void OnShelfItemAdded(int32_t index, const ash::ShelfItem& item) override;
+ void OnShelfItemRemoved(int32_t index, const ash::ShelfItem& item) override;
+ void OnShelfItemMoved(int32_t start_index, int32_t target_index) override;
+ void OnShelfItemChanged(int32_t index, const ash::ShelfItem& item) override;
+ void OnShelfItemDelegateChanged(
+ const ash::ShelfID& id,
+ ash::mojom::ShelfItemDelegatePtr delegate) override;
// ash::ShelfModelObserver:
void ShelfItemAdded(int index) override;
void ShelfItemRemoved(int index, const ash::ShelfItem& old_item) override;
void ShelfItemMoved(int start_index, int target_index) override;
void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override;
+ void ShelfItemDelegateChanged(const ash::ShelfID& id,
+ ash::ShelfItemDelegate* delegate) override;
// ash::WindowTreeHostManager::Observer:
void OnDisplayConfigurationChanged() override;
@@ -396,6 +407,10 @@ class ChromeLauncherController
// True when setting a shelf pref in response to an observer notification.
bool updating_shelf_pref_from_observer_ = false;
+ // True when applying changes from the remote ShelfModel owned by Ash.
+ // Changes to the local ShelfModel should not be reported during this time.
+ bool applying_remote_shelf_model_changes_ = false;
+
// When true, changes to pinned shelf items should update the sync model.
bool should_sync_pin_changes_ = true;

Powered by Google App Engine
This is Rietveld 408576698