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

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

Issue 1802073002: Makes vertical alignment of location bar bubbles same (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 BookmarkModelFactory::GetForProfile(profile_) 267 BookmarkModelFactory::GetForProfile(profile_)
268 ->GetMostRecentlyAddedUserNodeForURL(url)), 268 ->GetMostRecentlyAddedUserNodeForURL(url)),
269 remove_button_(NULL), 269 remove_button_(NULL),
270 edit_button_(NULL), 270 edit_button_(NULL),
271 close_button_(NULL), 271 close_button_(NULL),
272 title_tf_(NULL), 272 title_tf_(NULL),
273 parent_combobox_(NULL), 273 parent_combobox_(NULL),
274 remove_bookmark_(false), 274 remove_bookmark_(false),
275 apply_edits_(true) { 275 apply_edits_(true) {
276 // Compensate for built-in vertical padding in the anchor view's image. 276 // Compensate for built-in vertical padding in the anchor view's image.
277 set_anchor_view_insets(gfx::Insets(2, 0, 2, 0)); 277 // This is different from 5 pixel inset that is used in other cases because
278 // this bubble is using NONE as the arrow type.
279 set_anchor_view_insets(gfx::Insets(-1, 0, -1, 0));
Evan Stade 2016/03/14 21:57:53 nit: gfx::Insets(-1, 0) can you colocate this wit
varkha 2016/03/14 22:13:06 Done.
278 } 280 }
279 281
280 base::string16 BookmarkBubbleView::GetTitle() { 282 base::string16 BookmarkBubbleView::GetTitle() {
281 BookmarkModel* bookmark_model = 283 BookmarkModel* bookmark_model =
282 BookmarkModelFactory::GetForProfile(profile_); 284 BookmarkModelFactory::GetForProfile(profile_);
283 const BookmarkNode* node = 285 const BookmarkNode* node =
284 bookmark_model->GetMostRecentlyAddedUserNodeForURL(url_); 286 bookmark_model->GetMostRecentlyAddedUserNodeForURL(url_);
285 if (node) 287 if (node)
286 return node->GetTitle(); 288 return node->GetTitle();
287 else 289 else
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (node) { 354 if (node) {
353 const base::string16 new_title = title_tf_->text(); 355 const base::string16 new_title = title_tf_->text();
354 if (new_title != node->GetTitle()) { 356 if (new_title != node->GetTitle()) {
355 model->SetTitle(node, new_title); 357 model->SetTitle(node, new_title);
356 content::RecordAction( 358 content::RecordAction(
357 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); 359 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble"));
358 } 360 }
359 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); 361 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index());
360 } 362 }
361 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698