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