Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/tabs/pinned_tab_service.h

Issue 1026005: Makes pinned tab restore on startup if you haven't enabled session (Closed)
Patch Set: check Created 10 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 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_TABS_PINNED_TAB_SERVICE_H_
6 #define CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
7
8 #include "chrome/common/notification_observer.h"
9 #include "chrome/common/notification_registrar.h"
10
11 class Browser;
12 class Profile;
13
14 // PinnedTabService is responsible for updating preferences with the set of
15 // pinned tabs to restore at startup. PinnedTabService listens for the
16 // appropriate set of notifications to know it should update preferences.
17 class PinnedTabService : public NotificationObserver {
18 public:
19 explicit PinnedTabService(Profile* profile);
20
21 private:
22 // Invoked when we're about to exit.
23 void GotExit();
24
25 // NotificationObserver.
26 virtual void Observe(NotificationType type,
27 const NotificationSource& source,
28 const NotificationDetails& details);
29
30 Profile* profile_;
31
32 // If true we've seen an exit event (or the last browser is closing which
33 // triggers an exit) and can ignore all other events.
34 bool got_exiting_;
35
36 NotificationRegistrar registrar_;
37
38 DISALLOW_COPY_AND_ASSIGN(PinnedTabService);
39 };
40
41 #endif // CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tabs/pinned_tab_codec_unittest.cc ('k') | chrome/browser/tabs/pinned_tab_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698