diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 01:04:45 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 01:04:45 +0000 |
commit | 733436966716d5307a251c2852931531edc9b963 (patch) | |
tree | 14f7a5d2538bb4a70852f5a3e0a6a8e0e94c1b43 /chrome/browser/views/bookmark_bubble_view.cc | |
parent | 489d946c2d39713777826de69d02546c8307e54e (diff) | |
download | chromium_src-733436966716d5307a251c2852931531edc9b963.zip chromium_src-733436966716d5307a251c2852931531edc9b963.tar.gz chromium_src-733436966716d5307a251c2852931531edc9b963.tar.bz2 |
Factor out views::Combobox::Model so that it can be used cross-platform.
This removes the Combobox* source arg from the Model methods, which wasn't really used by anything.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/165514
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bubble_view.cc')
-rw-r--r-- | chrome/browser/views/bookmark_bubble_view.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc index ba101f1a..8a21fe3 100644 --- a/chrome/browser/views/bookmark_bubble_view.cc +++ b/chrome/browser/views/bookmark_bubble_view.cc @@ -105,13 +105,12 @@ BookmarkBubbleView::RecentlyUsedFoldersModel::RecentlyUsedFoldersModel( find(nodes_.begin(), nodes_.end(), node->GetParent()) - nodes_.begin()); } -int BookmarkBubbleView::RecentlyUsedFoldersModel::GetItemCount( - Combobox* source) { +int BookmarkBubbleView::RecentlyUsedFoldersModel::GetItemCount() { return static_cast<int>(nodes_.size() + 1); } std::wstring BookmarkBubbleView::RecentlyUsedFoldersModel::GetItemAt( - Combobox* source, int index) { + int index) { if (index == nodes_.size()) return l10n_util::GetString(IDS_BOOMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER); return nodes_[index]->GetTitle(); @@ -336,7 +335,7 @@ void BookmarkBubbleView::LinkActivated(Link* source, int event_flags) { void BookmarkBubbleView::ItemChanged(Combobox* combobox, int prev_index, int new_index) { - if (new_index + 1 == parent_model_.GetItemCount(parent_combobox_)) { + if (new_index + 1 == parent_model_.GetItemCount()) { UserMetrics::RecordAction(L"BookmarkBubble_EditFromCombobox", profile_); ShowEditor(); @@ -417,7 +416,7 @@ void BookmarkBubbleView::ApplyEdits() { } // Last index means 'Choose another folder...' if (parent_combobox_->selected_item() < - parent_model_.GetItemCount(parent_combobox_) - 1) { + parent_model_.GetItemCount() - 1) { const BookmarkNode* new_parent = parent_model_.GetNodeAt(parent_combobox_->selected_item()); if (new_parent != node->GetParent()) { |