OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Structs that hold data used in broadcasting notifications. | 5 // Structs that hold data used in broadcasting notifications. |
6 | 6 |
7 #ifndef CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ | 7 #ifndef CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ |
8 #define CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ | 8 #define CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 #include <vector> | |
12 | 11 |
13 #include "googleurl/src/gurl.h" | 12 #include "chrome/browser/history/history_details.h" |
14 #include "chrome/browser/history/history_types.h" | 13 #include "chrome/browser/history/history_types.h" |
15 #include "chrome/browser/search_engines/template_url_id.h" | 14 #include "chrome/browser/search_engines/template_url_id.h" |
| 15 #include "googleurl/src/gurl.h" |
16 | 16 |
17 namespace history { | 17 namespace history { |
18 | 18 |
19 // Base class for history notifications. This needs only a virtual destructor | |
20 // so that the history service's broadcaster can delete it when the request | |
21 // is complete. | |
22 struct HistoryDetails { | |
23 public: | |
24 virtual ~HistoryDetails() {} | |
25 }; | |
26 | |
27 // Details for NOTIFICATION_HISTORY_URL_VISITED. | 19 // Details for NOTIFICATION_HISTORY_URL_VISITED. |
28 struct URLVisitedDetails : public HistoryDetails { | 20 struct URLVisitedDetails : public HistoryDetails { |
29 URLVisitedDetails(); | 21 URLVisitedDetails(); |
30 virtual ~URLVisitedDetails(); | 22 virtual ~URLVisitedDetails(); |
31 | 23 |
32 content::PageTransition transition; | 24 content::PageTransition transition; |
33 URLRow row; | 25 URLRow row; |
34 | 26 |
35 // A list of redirects leading up to the URL represented by this struct. If | 27 // A list of redirects leading up to the URL represented by this struct. If |
36 // we have the redirect chain A -> B -> C and this struct represents visiting | 28 // we have the redirect chain A -> B -> C and this struct represents visiting |
(...skipping 25 matching lines...) Expand all Loading... |
62 | 54 |
63 // The URLRows of URLs deleted. This is valid only when |all_history| is false | 55 // The URLRows of URLs deleted. This is valid only when |all_history| is false |
64 // indicating that a subset of history has been deleted. | 56 // indicating that a subset of history has been deleted. |
65 URLRows rows; | 57 URLRows rows; |
66 | 58 |
67 // The list of deleted favicon urls. This is valid only when |all_history| is | 59 // The list of deleted favicon urls. This is valid only when |all_history| is |
68 // false, indicating that a subset of history has been deleted. | 60 // false, indicating that a subset of history has been deleted. |
69 std::set<GURL> favicon_urls; | 61 std::set<GURL> favicon_urls; |
70 }; | 62 }; |
71 | 63 |
72 // Details for NOTIFY_FAVICON_CHANGED. | |
73 struct FaviconChangeDetails : public HistoryDetails { | |
74 FaviconChangeDetails(); | |
75 virtual ~FaviconChangeDetails(); | |
76 | |
77 std::set<GURL> urls; | |
78 }; | |
79 | |
80 // Details for HISTORY_KEYWORD_SEARCH_TERM_UPDATED. | 64 // Details for HISTORY_KEYWORD_SEARCH_TERM_UPDATED. |
81 struct KeywordSearchTermDetails : public HistoryDetails { | 65 struct KeywordSearchTermDetails : public HistoryDetails { |
82 KeywordSearchTermDetails(); | 66 KeywordSearchTermDetails(); |
83 virtual ~KeywordSearchTermDetails(); | 67 virtual ~KeywordSearchTermDetails(); |
84 | 68 |
85 GURL url; | 69 GURL url; |
86 TemplateURLID keyword_id; | 70 TemplateURLID keyword_id; |
87 string16 term; | 71 string16 term; |
88 }; | 72 }; |
89 | 73 |
90 } // namespace history | 74 } // namespace history |
91 | 75 |
92 #endif // CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ | 76 #endif // CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__ |
OLD | NEW |