| 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 #ifndef CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, ChapterStops); | 87 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, ChapterStops); |
| 88 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, EscapeLabel); | 88 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, EscapeLabel); |
| 89 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, FaviconLoadTest); | 89 FRIEND_TEST_ALL_PREFIXES(BackFwdMenuModelTest, FaviconLoadTest); |
| 90 | 90 |
| 91 // Requests a favicon from the FaviconService. Called by GetIconAt if the | 91 // Requests a favicon from the FaviconService. Called by GetIconAt if the |
| 92 // NavigationEntry has an invalid favicon. | 92 // NavigationEntry has an invalid favicon. |
| 93 void FetchFavicon(content::NavigationEntry* entry); | 93 void FetchFavicon(content::NavigationEntry* entry); |
| 94 | 94 |
| 95 // Callback from the favicon service. | 95 // Callback from the favicon service. |
| 96 void OnFavIconDataAvailable(FaviconService::Handle handle, | 96 void OnFavIconDataAvailable(FaviconService::Handle handle, |
| 97 history::FaviconData favicon); | 97 history::FaviconData favicon_data, |
| 98 std::vector<GURL> icon_urls_in_db); |
| 98 | 99 |
| 99 // Allows the unit test to use its own dummy tab contents. | 100 // Allows the unit test to use its own dummy tab contents. |
| 100 void set_test_web_contents(content::WebContents* test_web_contents) { | 101 void set_test_web_contents(content::WebContents* test_web_contents) { |
| 101 test_web_contents_ = test_web_contents; | 102 test_web_contents_ = test_web_contents; |
| 102 } | 103 } |
| 103 | 104 |
| 104 // Returns how many history items the menu should show. For example, if the | 105 // Returns how many history items the menu should show. For example, if the |
| 105 // navigation controller of the current tab has a current entry index of 5 and | 106 // navigation controller of the current tab has a current entry index of 5 and |
| 106 // forward_direction_ is false (we are the back button delegate) then this | 107 // forward_direction_ is false (we are the back button delegate) then this |
| 107 // function will return 5 (representing 0-4). If forward_direction_ is | 108 // function will return 5 (representing 0-4). If forward_direction_ is |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Used for loading favicons from history. | 199 // Used for loading favicons from history. |
| 199 CancelableRequestConsumerTSimple<int> load_consumer_; | 200 CancelableRequestConsumerTSimple<int> load_consumer_; |
| 200 | 201 |
| 201 // Used for receiving notifications when an icon is changed. | 202 // Used for receiving notifications when an icon is changed. |
| 202 ui::MenuModelDelegate* menu_model_delegate_; | 203 ui::MenuModelDelegate* menu_model_delegate_; |
| 203 | 204 |
| 204 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); | 205 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); |
| 205 }; | 206 }; |
| 206 | 207 |
| 207 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ | 208 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ |
| OLD | NEW |