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
3 // found in the LICENSE file.
5 // Structs that hold data used in broadcasting notifications.
7 #ifndef CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__
8 #define CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__
12 #include "chrome/browser/history/history_details.h"
13 #include "chrome/browser/history/history_types.h"
14 #include "chrome/browser/search_engines/template_url_id.h"
19 // Details for NOTIFICATION_HISTORY_URL_VISITED.
20 struct URLVisitedDetails : public HistoryDetails {
22 virtual ~URLVisitedDetails();
24 content::PageTransition transition;
27 // A list of redirects leading up to the URL represented by this struct. If
28 // we have the redirect chain A -> B -> C and this struct represents visiting
29 // C, then redirects[0]=B and redirects[1]=A. If there are no redirects,
30 // this will be an empty vector.
31 history::RedirectList redirects;
34 // Details for NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED.
35 struct URLsModifiedDetails : public HistoryDetails {
36 URLsModifiedDetails();
37 virtual ~URLsModifiedDetails();
39 // Lists the information for each of the URLs affected.
43 // Details for NOTIFICATION_HISTORY_URLS_DELETED.
44 struct URLsDeletedDetails : public HistoryDetails {
46 virtual ~URLsDeletedDetails();
48 // Set when all history was deleted. False means just a subset was deleted.
51 // True if the data was archived. False if the data was deleted in response to
52 // an explicit user action through the History UI.
55 // The URLRows of URLs deleted. This is valid only when |all_history| is false
56 // indicating that a subset of history has been deleted.
59 // The list of deleted favicon urls. This is valid only when |all_history| is
60 // false, indicating that a subset of history has been deleted.
61 std::set<GURL> favicon_urls;
64 // Details for HISTORY_KEYWORD_SEARCH_TERM_UPDATED.
65 struct KeywordSearchUpdatedDetails : public HistoryDetails {
66 KeywordSearchUpdatedDetails(const GURL& url,
67 TemplateURLID keyword_id,
68 const string16& term);
69 virtual ~KeywordSearchUpdatedDetails();
72 TemplateURLID keyword_id;
76 // Details for HISTORY_KEYWORD_SEARCH_TERM_DELETED.
77 struct KeywordSearchDeletedDetails : public HistoryDetails {
78 explicit KeywordSearchDeletedDetails(const GURL& url);
79 virtual ~KeywordSearchDeletedDetails();
84 } // namespace history
86 #endif // CHROME_BROWSER_HISTORY_HISTORY_NOTIFICATIONS_H__