Home | History | Annotate | Download | only in app_list
      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 
     12 namespace app_list {
     13 class AppListModel;
     14 }
     15 
     16 class AppSyncUIState;
     17 class Profile;
     18 
     19 // AppSyncUIStateWatcher updates AppListModel status when AppSyncUIState
     20 // of the given profile changes.
     21 class 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