BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / tabs / pinned_tab_service.h
blob776092e9779623fb3cf417b0649ee0577bdafccd
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 CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_H_
6 #define CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_H_
8 #include "base/compiler_specific.h"
9 #include "components/keyed_service/core/keyed_service.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
13 class Profile;
15 // PinnedTabService is responsible for updating preferences with the set of
16 // pinned tabs to restore at startup. PinnedTabService listens for the
17 // appropriate set of notifications to know it should update preferences.
18 class PinnedTabService : public content::NotificationObserver,
19 public KeyedService {
20 public:
21 explicit PinnedTabService(Profile* profile);
23 private:
24 // content::NotificationObserver.
25 void Observe(int type,
26 const content::NotificationSource& source,
27 const content::NotificationDetails& details) override;
29 Profile* profile_;
31 // True if we should save the pinned tabs when a browser window closes or the
32 // user exits the application.
33 bool save_pinned_tabs_;
35 // True if there is at least one normal browser for our profile.
36 bool has_normal_browser_;
38 content::NotificationRegistrar registrar_;
40 DISALLOW_COPY_AND_ASSIGN(PinnedTabService);
43 #endif // CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_H_