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

Side by Side Diff: chrome/browser/extensions/extension_history_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_HISTORY_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_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/history/history.h" 12 #include "chrome/browser/history/history.h"
13 #include "chrome/browser/history/history_notifications.h" 13 #include "chrome/browser/history/history_notifications.h"
14 #include "content/common/notification_registrar.h" 14 #include "content/common/notification_registrar.h"
15 15
16 // Observes History service and routes the notifications as events to the 16 // Observes History service and routes the notifications as events to the
17 // extension system. 17 // extension system.
18 class ExtensionHistoryEventRouter : public NotificationObserver { 18 class ExtensionHistoryEventRouter : public NotificationObserver {
19 public: 19 public:
20 explicit ExtensionHistoryEventRouter(); 20 explicit ExtensionHistoryEventRouter();
21 virtual ~ExtensionHistoryEventRouter(); 21 virtual ~ExtensionHistoryEventRouter();
22 22
23 void ObserveProfile(Profile* profile); 23 void ObserveProfile(Profile* profile);
24 24
25 private: 25 private:
26 // NotificationObserver::Observe. 26 // NotificationObserver::Observe.
27 virtual void Observe(NotificationType type, 27 virtual void Observe(int type,
28 const NotificationSource& source, 28 const NotificationSource& source,
29 const NotificationDetails& details); 29 const NotificationDetails& details);
30 30
31 void HistoryUrlVisited(Profile* profile, 31 void HistoryUrlVisited(Profile* profile,
32 const history::URLVisitedDetails* details); 32 const history::URLVisitedDetails* details);
33 33
34 void HistoryUrlsRemoved(Profile* profile, 34 void HistoryUrlsRemoved(Profile* profile,
35 const history::URLsDeletedDetails* details); 35 const history::URLsDeletedDetails* details);
36 36
37 void DispatchEvent(Profile* profile, 37 void DispatchEvent(Profile* profile,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 class DeleteRangeHistoryFunction : public HistoryFunctionWithCallback { 130 class DeleteRangeHistoryFunction : public HistoryFunctionWithCallback {
131 public: 131 public:
132 virtual bool RunAsyncImpl(); 132 virtual bool RunAsyncImpl();
133 DECLARE_EXTENSION_FUNCTION_NAME("history.deleteRange"); 133 DECLARE_EXTENSION_FUNCTION_NAME("history.deleteRange");
134 134
135 // Callback for the history service to acknowledge deletion. 135 // Callback for the history service to acknowledge deletion.
136 void DeleteComplete(); 136 void DeleteComplete();
137 }; 137 };
138 138
139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ 139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_gallery_install_apitest.cc ('k') | chrome/browser/extensions/extension_history_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698