OLD | NEW |
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_MOST_VISITED_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_MOST_VISITED_HANDLER_H_ |
6 #define CHROME_BROWSER_DOM_UI_MOST_VISITED_HANDLER_H_ | 6 #define CHROME_BROWSER_DOM_UI_MOST_VISITED_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void RemovePinnedURL(const GURL& url); | 99 void RemovePinnedURL(const GURL& url); |
100 | 100 |
101 // Sends pages_value_ to the javascript side to and resets page_value_. | 101 // Sends pages_value_ to the javascript side to and resets page_value_. |
102 void SendPagesValue(); | 102 void SendPagesValue(); |
103 | 103 |
104 // Returns true if we should treat this as the first run of the new tab page. | 104 // Returns true if we should treat this as the first run of the new tab page. |
105 bool IsFirstRun(); | 105 bool IsFirstRun(); |
106 | 106 |
107 static const std::vector<MostVisitedPage>& GetPrePopulatedPages(); | 107 static const std::vector<MostVisitedPage>& GetPrePopulatedPages(); |
108 | 108 |
| 109 static MostVisitedPage GetChromeStorePage(); |
| 110 |
| 111 // Whether we have any apps installed. |
| 112 bool HasApps() const; |
| 113 |
109 NotificationRegistrar registrar_; | 114 NotificationRegistrar registrar_; |
110 | 115 |
111 // Our consumer for the history service. | 116 // Our consumer for the history service. |
112 CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_; | 117 CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_; |
113 CancelableRequestConsumer topsites_consumer_; | 118 CancelableRequestConsumer topsites_consumer_; |
114 | 119 |
115 // The most visited URLs, in priority order. | 120 // The most visited URLs, in priority order. |
116 // Only used for matching up clicks on the page to which most visited entry | 121 // Only used for matching up clicks on the page to which most visited entry |
117 // was clicked on for metrics purposes. | 122 // was clicked on for metrics purposes. |
118 std::vector<GURL> most_visited_urls_; | 123 std::vector<GURL> most_visited_urls_; |
(...skipping 13 matching lines...) Expand all Loading... |
132 // we get the first getMostVisited() call. | 137 // we get the first getMostVisited() call. |
133 bool got_first_most_visited_request_; | 138 bool got_first_most_visited_request_; |
134 | 139 |
135 // Keep the results of the db query here. | 140 // Keep the results of the db query here. |
136 scoped_ptr<ListValue> pages_value_; | 141 scoped_ptr<ListValue> pages_value_; |
137 | 142 |
138 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); | 143 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); |
139 }; | 144 }; |
140 | 145 |
141 #endif // CHROME_BROWSER_DOM_UI_MOST_VISITED_HANDLER_H_ | 146 #endif // CHROME_BROWSER_DOM_UI_MOST_VISITED_HANDLER_H_ |
OLD | NEW |