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

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

Issue 113940: Make Textfield more portable.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « chrome/browser/input_window_dialog_win.cc ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/bookmark_bubble_view.h" 5 #include "chrome/browser/views/bookmark_bubble_view.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 } 404 }
405 405
406 void BookmarkBubbleView::ApplyEdits() { 406 void BookmarkBubbleView::ApplyEdits() {
407 // Set this to make sure we don't attempt to apply edits again. 407 // Set this to make sure we don't attempt to apply edits again.
408 apply_edits_ = false; 408 apply_edits_ = false;
409 409
410 BookmarkModel* model = profile_->GetBookmarkModel(); 410 BookmarkModel* model = profile_->GetBookmarkModel();
411 BookmarkNode* node = model->GetMostRecentlyAddedNodeForURL(url_); 411 BookmarkNode* node = model->GetMostRecentlyAddedNodeForURL(url_);
412 if (node) { 412 if (node) {
413 const std::wstring new_title = title_tf_->GetText(); 413 const std::wstring new_title = title_tf_->text();
414 if (new_title != node->GetTitle()) { 414 if (new_title != node->GetTitle()) {
415 model->SetTitle(node, new_title); 415 model->SetTitle(node, new_title);
416 UserMetrics::RecordAction(L"BookmarkBubble_ChangeTitleInBubble", 416 UserMetrics::RecordAction(L"BookmarkBubble_ChangeTitleInBubble",
417 profile_); 417 profile_);
418 } 418 }
419 // Last index means 'Choose another folder...' 419 // Last index means 'Choose another folder...'
420 if (parent_combobox_->GetSelectedItem() < 420 if (parent_combobox_->GetSelectedItem() <
421 parent_model_.GetItemCount(parent_combobox_) - 1) { 421 parent_model_.GetItemCount(parent_combobox_) - 1) {
422 BookmarkNode* new_parent = 422 BookmarkNode* new_parent =
423 parent_model_.GetNodeAt(parent_combobox_->GetSelectedItem()); 423 parent_model_.GetNodeAt(parent_combobox_->GetSelectedItem());
424 if (new_parent != node->GetParent()) { 424 if (new_parent != node->GetParent()) {
425 UserMetrics::RecordAction(L"BookmarkBubble_ChangeParent", profile_); 425 UserMetrics::RecordAction(L"BookmarkBubble_ChangeParent", profile_);
426 model->Move(node, new_parent, new_parent->GetChildCount()); 426 model->Move(node, new_parent, new_parent->GetChildCount());
427 } 427 }
428 } 428 }
429 } 429 }
430 } 430 }
OLDNEW
« no previous file with comments | « chrome/browser/input_window_dialog_win.cc ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698