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 #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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 BookmarkModelFactory::GetForProfile(profile_)-> | 248 BookmarkModelFactory::GetForProfile(profile_)-> |
249 GetMostRecentlyAddedNodeForURL(url)), | 249 GetMostRecentlyAddedNodeForURL(url)), |
250 remove_link_(NULL), | 250 remove_link_(NULL), |
251 edit_button_(NULL), | 251 edit_button_(NULL), |
252 close_button_(NULL), | 252 close_button_(NULL), |
253 title_tf_(NULL), | 253 title_tf_(NULL), |
254 parent_combobox_(NULL), | 254 parent_combobox_(NULL), |
255 remove_bookmark_(false), | 255 remove_bookmark_(false), |
256 apply_edits_(true) { | 256 apply_edits_(true) { |
257 // Compensate for built-in vertical padding in the anchor view's image. | 257 // Compensate for built-in vertical padding in the anchor view's image. |
258 set_anchor_insets(gfx::Insets(5, 0, 5, 0)); | 258 set_anchor_view_insets(gfx::Insets(5, 0, 5, 0)); |
259 } | 259 } |
260 | 260 |
261 string16 BookmarkBubbleView::GetTitle() { | 261 string16 BookmarkBubbleView::GetTitle() { |
262 BookmarkModel* bookmark_model = | 262 BookmarkModel* bookmark_model = |
263 BookmarkModelFactory::GetForProfile(profile_); | 263 BookmarkModelFactory::GetForProfile(profile_); |
264 const BookmarkNode* node = | 264 const BookmarkNode* node = |
265 bookmark_model->GetMostRecentlyAddedNodeForURL(url_); | 265 bookmark_model->GetMostRecentlyAddedNodeForURL(url_); |
266 if (node) | 266 if (node) |
267 return node->GetTitle(); | 267 return node->GetTitle(); |
268 else | 268 else |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 const BookmarkNode* new_parent = | 336 const BookmarkNode* new_parent = |
337 parent_model_.GetNodeAt(parent_combobox_->selected_index()); | 337 parent_model_.GetNodeAt(parent_combobox_->selected_index()); |
338 if (new_parent != node->parent()) { | 338 if (new_parent != node->parent()) { |
339 content::RecordAction( | 339 content::RecordAction( |
340 UserMetricsAction("BookmarkBubble_ChangeParent")); | 340 UserMetricsAction("BookmarkBubble_ChangeParent")); |
341 model->Move(node, new_parent, new_parent->child_count()); | 341 model->Move(node, new_parent, new_parent->child_count()); |
342 } | 342 } |
343 } | 343 } |
344 } | 344 } |
345 } | 345 } |
OLD | NEW |