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

Side by Side Diff: chrome/browser/extensions/extension_preference_api.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
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_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/extensions/extension_function.h" 11 #include "chrome/browser/extensions/extension_function.h"
12 #include "chrome/browser/prefs/pref_change_registrar.h" 12 #include "chrome/browser/prefs/pref_change_registrar.h"
13 #include "content/common/notification_observer.h" 13 #include "content/common/notification_observer.h"
14 14
15 class ExtensionPreferenceEventRouter : public NotificationObserver { 15 class ExtensionPreferenceEventRouter : public NotificationObserver {
16 public: 16 public:
17 explicit ExtensionPreferenceEventRouter(Profile* profile); 17 explicit ExtensionPreferenceEventRouter(Profile* profile);
18 virtual ~ExtensionPreferenceEventRouter(); 18 virtual ~ExtensionPreferenceEventRouter();
19 19
20 private: 20 private:
21 // NotificationObserver implementation. 21 // NotificationObserver implementation.
22 virtual void Observe(NotificationType type, 22 virtual void Observe(int type,
23 const NotificationSource& source, 23 const NotificationSource& source,
24 const NotificationDetails& details); 24 const NotificationDetails& details);
25 25
26 void OnPrefChanged(PrefService* pref_service, const std::string& pref_key); 26 void OnPrefChanged(PrefService* pref_service, const std::string& pref_key);
27 27
28 // This method dispatches events to the extension message service. 28 // This method dispatches events to the extension message service.
29 void DispatchEvent(const std::string& extension_id, 29 void DispatchEvent(const std::string& extension_id,
30 const std::string& event_name, 30 const std::string& event_name,
31 const std::string& json_args); 31 const std::string& json_args);
32 32
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 }; 77 };
78 78
79 class ClearPreferenceFunction : public SyncExtensionFunction { 79 class ClearPreferenceFunction : public SyncExtensionFunction {
80 public: 80 public:
81 virtual ~ClearPreferenceFunction(); 81 virtual ~ClearPreferenceFunction();
82 virtual bool RunImpl(); 82 virtual bool RunImpl();
83 DECLARE_EXTENSION_FUNCTION_NAME("types.ChromeSetting.clear") 83 DECLARE_EXTENSION_FUNCTION_NAME("types.ChromeSetting.clear")
84 }; 84 };
85 85
86 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 86 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_apitest.cc ('k') | chrome/browser/extensions/extension_preference_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698