| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 7 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool BackForwardMenuModel::IsItemCheckedAt(int index) const { | 126 bool BackForwardMenuModel::IsItemCheckedAt(int index) const { |
| 127 return false; | 127 return false; |
| 128 } | 128 } |
| 129 | 129 |
| 130 int BackForwardMenuModel::GetGroupIdAt(int index) const { | 130 int BackForwardMenuModel::GetGroupIdAt(int index) const { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool BackForwardMenuModel::GetIconAt(int index, SkBitmap* icon) { | 134 bool BackForwardMenuModel::GetIconAt(int index, gfx::ImageSkia* icon) { |
| 135 if (!ItemHasIcon(index)) | 135 if (!ItemHasIcon(index)) |
| 136 return false; | 136 return false; |
| 137 | 137 |
| 138 if (index == GetItemCount() - 1) { | 138 if (index == GetItemCount() - 1) { |
| 139 *icon = *ResourceBundle::GetSharedInstance().GetBitmapNamed( | 139 *icon = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 140 IDR_HISTORY_FAVICON); | 140 IDR_HISTORY_FAVICON); |
| 141 } else { | 141 } else { |
| 142 NavigationEntry* entry = GetNavigationEntry(index); | 142 NavigationEntry* entry = GetNavigationEntry(index); |
| 143 *icon = entry->GetFavicon().bitmap; | 143 *icon = entry->GetFavicon().bitmap; |
| 144 if (!entry->GetFavicon().valid && menu_model_delegate()) { | 144 if (!entry->GetFavicon().valid && menu_model_delegate()) { |
| 145 FetchFavicon(entry); | 145 FetchFavicon(entry); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 return true; | 149 return true; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 metric_string += "ForwardMenu_"; | 463 metric_string += "ForwardMenu_"; |
| 464 else | 464 else |
| 465 metric_string += "BackMenu_"; | 465 metric_string += "BackMenu_"; |
| 466 metric_string += action; | 466 metric_string += action; |
| 467 if (index != -1) { | 467 if (index != -1) { |
| 468 // +1 is for historical reasons (indices used to start at 1). | 468 // +1 is for historical reasons (indices used to start at 1). |
| 469 metric_string += base::IntToString(index + 1); | 469 metric_string += base::IntToString(index + 1); |
| 470 } | 470 } |
| 471 return metric_string; | 471 return metric_string; |
| 472 } | 472 } |
| OLD | NEW |