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

Side by Side Diff: chrome/browser/dom_ui/shown_sections_handler.h

Issue 4658006: Open apps section on NTP when new app get installed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments resolved Created 10 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 | « no previous file | chrome/browser/dom_ui/shown_sections_handler.cc » ('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) 2010 The Chromium Authors. All rights reserved. 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 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_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
6 #define CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/dom_ui/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
10 #include "chrome/common/notification_observer.h" 10 #include "chrome/common/notification_observer.h"
11 #include "chrome/common/notification_registrar.h"
12 #include "chrome/browser/prefs/pref_change_registrar.h" 11 #include "chrome/browser/prefs/pref_change_registrar.h"
13 12
14 class DOMUI; 13 class DOMUI;
14 class Extension;
15 class Value; 15 class Value;
16 class PrefService; 16 class PrefService;
17 17
18 // Use for the shown sections bitmask. 18 // Use for the shown sections bitmask.
19 // Currently, only the THUMB and APPS sections can be toggled by the user. Other 19 // Currently, only the THUMB and APPS sections can be toggled by the user. Other
20 // sections are shown automatically if they have data, and hidden otherwise. 20 // sections are shown automatically if they have data, and hidden otherwise.
21 enum Section { 21 enum Section {
22 // If one of these is set, the corresponding section shows large thumbnails, 22 // If one of these is set, the corresponding section shows large thumbnails,
23 // else it shows only a small overview list. 23 // else it shows only a small overview list.
24 THUMB = 1 << 0, 24 THUMB = 1 << 0,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Callback for "setShownSections" message. 57 // Callback for "setShownSections" message.
58 void HandleSetShownSections(const ListValue* args); 58 void HandleSetShownSections(const ListValue* args);
59 59
60 static void RegisterUserPrefs(PrefService* pref_service); 60 static void RegisterUserPrefs(PrefService* pref_service);
61 61
62 static void MigrateUserPrefs(PrefService* pref_service, 62 static void MigrateUserPrefs(PrefService* pref_service,
63 int old_pref_version, 63 int old_pref_version,
64 int new_pref_version); 64 int new_pref_version);
65 65
66 static void OnExtensionInstalled(PrefService* prefs,
67 const Extension* extension);
68
66 private: 69 private:
67 PrefService* pref_service_; 70 PrefService* pref_service_;
68 PrefChangeRegistrar pref_registrar_; 71 PrefChangeRegistrar pref_registrar_;
69 NotificationRegistrar notification_registrar_;
70 72
71 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler); 73 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler);
72 }; 74 };
73 75
74 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 76 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/shown_sections_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698