Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 9965017: views: Rename ComboboxListener::ItemChanged to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo_box -> combobox Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void BookmarkBubbleView::LinkClicked(views::Link* source, int event_flags) { 279 void BookmarkBubbleView::LinkClicked(views::Link* source, int event_flags) {
280 DCHECK(source == remove_link_); 280 DCHECK(source == remove_link_);
281 content::RecordAction(UserMetricsAction("BookmarkBubble_Unstar")); 281 content::RecordAction(UserMetricsAction("BookmarkBubble_Unstar"));
282 282
283 // Set this so we remove the bookmark after the window closes. 283 // Set this so we remove the bookmark after the window closes.
284 remove_bookmark_ = true; 284 remove_bookmark_ = true;
285 apply_edits_ = false; 285 apply_edits_ = false;
286 StartFade(false); 286 StartFade(false);
287 } 287 }
288 288
289 void BookmarkBubbleView::ItemChanged(views::Combobox* combo_box, 289 void BookmarkBubbleView::OnSelectedIndexChanged(views::Combobox* combobox) {
290 int prev_index, 290 if (combobox->selected_index() + 1 == parent_model_.GetItemCount()) {
291 int new_index) { 291 content::RecordAction(UserMetricsAction("BookmarkBubble_EditFromCombobox"));
292 if (new_index + 1 == parent_model_.GetItemCount()) {
293 content::RecordAction(
294 UserMetricsAction("BookmarkBubble_EditFromCombobox"));
295 ShowEditor(); 292 ShowEditor();
296 } 293 }
297 } 294 }
298 295
299 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { 296 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) {
300 if (sender == edit_button_) { 297 if (sender == edit_button_) {
301 content::RecordAction(UserMetricsAction("BookmarkBubble_Edit")); 298 content::RecordAction(UserMetricsAction("BookmarkBubble_Edit"));
302 ShowEditor(); 299 ShowEditor();
303 } else { 300 } else {
304 DCHECK_EQ(sender, close_button_); 301 DCHECK_EQ(sender, close_button_);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 const BookmarkNode* new_parent = 335 const BookmarkNode* new_parent =
339 parent_model_.GetNodeAt(parent_combobox_->selected_index()); 336 parent_model_.GetNodeAt(parent_combobox_->selected_index());
340 if (new_parent != node->parent()) { 337 if (new_parent != node->parent()) {
341 content::RecordAction( 338 content::RecordAction(
342 UserMetricsAction("BookmarkBubble_ChangeParent")); 339 UserMetricsAction("BookmarkBubble_ChangeParent"));
343 model->Move(node, new_parent, new_parent->child_count()); 340 model->Move(node, new_parent, new_parent->child_count());
344 } 341 }
345 } 342 }
346 } 343 }
347 } 344 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h ('k') | chrome/browser/ui/views/cookie_info_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698