1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_SYNC_UI_STATE_WATCHER_H_ 6#define CHROME_BROWSER_UI_ASH_APP_LIST_APP_SYNC_UI_STATE_WATCHER_H_ 7 8#include "base/basictypes.h" 9#include "base/compiler_specific.h" 10#include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" 11 12namespace app_list { 13class AppListModel; 14} 15 16class AppSyncUIState; 17class Profile; 18 19// AppSyncUIStateWatcher updates AppListModel status when AppSyncUIState 20// of the given profile changes. 21class AppSyncUIStateWatcher : public AppSyncUIStateObserver { 22 public: 23 AppSyncUIStateWatcher(Profile* profile, app_list::AppListModel* model); 24 virtual ~AppSyncUIStateWatcher(); 25 26 private: 27 // AppSyncUIStateObserver overrides: 28 virtual void OnAppSyncUIStatusChanged() OVERRIDE; 29 30 AppSyncUIState* app_sync_ui_state_; 31 app_list::AppListModel* model_; // Owned by AppListView 32 33 DISALLOW_COPY_AND_ASSIGN(AppSyncUIStateWatcher); 34}; 35 36#endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_SYNC_UI_STATE_WATCHER_H_ 37