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

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

Issue 6162006: Changes to default apps promo per ui leads: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | 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"
(...skipping 25 matching lines...) Expand all
36 36
37 class ShownSectionsHandler : public DOMMessageHandler, 37 class ShownSectionsHandler : public DOMMessageHandler,
38 public NotificationObserver { 38 public NotificationObserver {
39 public: 39 public:
40 explicit ShownSectionsHandler(PrefService* pref_service); 40 explicit ShownSectionsHandler(PrefService* pref_service);
41 virtual ~ShownSectionsHandler() {} 41 virtual ~ShownSectionsHandler() {}
42 42
43 // Helper to get the current shown sections. 43 // Helper to get the current shown sections.
44 static int GetShownSections(PrefService* pref_service); 44 static int GetShownSections(PrefService* pref_service);
45 45
46 // Expands |section|, collapsing any previously expanded section. This is the
47 // same thing that happens if a user clicks on |section|.
48 static void SetShownSection(PrefService* prefs, Section section);
49
46 // DOMMessageHandler implementation. 50 // DOMMessageHandler implementation.
47 virtual void RegisterMessages(); 51 virtual void RegisterMessages();
48 52
49 // NotificationObserver implementation. 53 // NotificationObserver implementation.
50 virtual void Observe(NotificationType type, 54 virtual void Observe(NotificationType type,
51 const NotificationSource& source, 55 const NotificationSource& source,
52 const NotificationDetails& details); 56 const NotificationDetails& details);
53 57
54 // Callback for "getShownSections" message. 58 // Callback for "getShownSections" message.
55 void HandleGetShownSections(const ListValue* args); 59 void HandleGetShownSections(const ListValue* args);
(...skipping 11 matching lines...) Expand all
67 const Extension* extension); 71 const Extension* extension);
68 72
69 private: 73 private:
70 PrefService* pref_service_; 74 PrefService* pref_service_;
71 PrefChangeRegistrar pref_registrar_; 75 PrefChangeRegistrar pref_registrar_;
72 76
73 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler); 77 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler);
74 }; 78 };
75 79
76 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 80 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/shown_sections_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698