Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

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

Issue 8614003: Add OVERRIDE to chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tabs/default_tab_handler.h ('k') | chrome/browser/tabs/tab_strip_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_ 5 #ifndef CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
6 #define CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_ 6 #define CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h"
9 #include "chrome/browser/profiles/profile_keyed_service.h" 10 #include "chrome/browser/profiles/profile_keyed_service.h"
10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
12 13
13 class Profile; 14 class Profile;
14 15
15 // PinnedTabService is responsible for updating preferences with the set of 16 // PinnedTabService is responsible for updating preferences with the set of
16 // pinned tabs to restore at startup. PinnedTabService listens for the 17 // pinned tabs to restore at startup. PinnedTabService listens for the
17 // appropriate set of notifications to know it should update preferences. 18 // appropriate set of notifications to know it should update preferences.
18 class PinnedTabService : public content::NotificationObserver, 19 class PinnedTabService : public content::NotificationObserver,
19 public ProfileKeyedService { 20 public ProfileKeyedService {
20 public: 21 public:
21 explicit PinnedTabService(Profile* profile); 22 explicit PinnedTabService(Profile* profile);
22 23
23 private: 24 private:
24 // Invoked when we're about to exit. 25 // Invoked when we're about to exit.
25 void GotExit(); 26 void GotExit();
26 27
27 // content::NotificationObserver. 28 // content::NotificationObserver.
28 virtual void Observe(int type, 29 virtual void Observe(int type,
29 const content::NotificationSource& source, 30 const content::NotificationSource& source,
30 const content::NotificationDetails& details); 31 const content::NotificationDetails& details) OVERRIDE;
31 32
32 Profile* profile_; 33 Profile* profile_;
33 34
34 // If true we've seen an exit event (or the last browser is closing which 35 // If true we've seen an exit event (or the last browser is closing which
35 // triggers an exit) and can ignore all other events. 36 // triggers an exit) and can ignore all other events.
36 bool got_exiting_; 37 bool got_exiting_;
37 38
38 // True if there is at least one normal browser for our profile. 39 // True if there is at least one normal browser for our profile.
39 bool has_normal_browser_; 40 bool has_normal_browser_;
40 41
41 content::NotificationRegistrar registrar_; 42 content::NotificationRegistrar registrar_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(PinnedTabService); 44 DISALLOW_COPY_AND_ASSIGN(PinnedTabService);
44 }; 45 };
45 46
46 #endif // CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_ 47 #endif // CHROME_BROWSER_TABS_PINNED_TAB_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tabs/default_tab_handler.h ('k') | chrome/browser/tabs/tab_strip_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698