Bluetooth: remove private members from BluetoothAdapter
[chromium-blink-merge.git] / apps / app_restore_service.h
bloba308c316f4a78d232968b8614d05e423c020dff8
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.
5 #ifndef APPS_APP_RESTORE_SERVICE_H_
6 #define APPS_APP_RESTORE_SERVICE_H_
8 #include <string>
9 #include <vector>
11 #include "chrome/browser/profiles/profile_keyed_service.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h"
15 namespace extensions {
16 class Extension;
18 namespace app_file_handler_util {
19 struct SavedFileEntry;
24 class Profile;
26 using extensions::app_file_handler_util::SavedFileEntry;
28 namespace apps {
30 // Tracks what apps need to be restarted when the browser restarts.
31 class AppRestoreService : public ProfileKeyedService,
32 public content::NotificationObserver {
33 public:
34 explicit AppRestoreService(Profile* profile);
36 // Restart apps that need to be restarted and clear the "running" preference
37 // from apps to prevent them being restarted in subsequent restarts.
38 void HandleStartup(bool should_restore_apps);
40 private:
41 // content::NotificationObserver.
42 virtual void Observe(int type,
43 const content::NotificationSource& source,
44 const content::NotificationDetails& details) OVERRIDE;
46 void RecordAppStart(const std::string& extension_id);
47 void RecordAppStop(const std::string& extension_id);
48 void RestoreApp(
49 const extensions::Extension* extension,
50 const std::vector<SavedFileEntry>& file_entries);
52 content::NotificationRegistrar registrar_;
53 Profile* profile_;
55 DISALLOW_COPY_AND_ASSIGN(AppRestoreService);
58 } // namespace apps
60 #endif // APPS_APP_RESTORE_SERVICE_H_