Chromium Code Reviews| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 BookmarkModelFactory::GetForBrowserContext(profile_) | 296 BookmarkModelFactory::GetForBrowserContext(profile_) |
| 297 ->GetMostRecentlyAddedUserNodeForURL(url)), | 297 ->GetMostRecentlyAddedUserNodeForURL(url)), |
| 298 remove_button_(nullptr), | 298 remove_button_(nullptr), |
| 299 edit_button_(nullptr), | 299 edit_button_(nullptr), |
| 300 close_button_(nullptr), | 300 close_button_(nullptr), |
| 301 title_tf_(nullptr), | 301 title_tf_(nullptr), |
| 302 parent_combobox_(nullptr), | 302 parent_combobox_(nullptr), |
| 303 ios_promo_view_(nullptr), | 303 ios_promo_view_(nullptr), |
| 304 remove_bookmark_(false), | 304 remove_bookmark_(false), |
| 305 apply_edits_(true), | 305 apply_edits_(true), |
| 306 is_showing_ios_promotion_(false) {} | 306 is_showing_ios_promotion_(false) { |
| 307 // Set title margins to make the title and the content left aligned. | |
| 308 const int side_margin = margins().left(); | |
| 309 set_title_margins( | |
| 310 gfx::Insets(LayoutDelegate::Get()->GetMetric( | |
| 311 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN), | |
| 312 side_margin, 0, side_margin)); | |
|
Peter Kasting
2017/04/11 20:26:29
Are the title and content misaligned on other simi
mrefaat1
2017/04/11 20:44:02
i'm not sure if its a problem on different dialogs
Peter Kasting
2017/04/11 20:57:05
Where is this passwords-specific fix? Did it land
mrefaat
2017/04/12 18:43:23
this is the specific fix: https://chromium.googles
| |
| 313 } | |
| 307 | 314 |
| 308 base::string16 BookmarkBubbleView::GetTitle() { | 315 base::string16 BookmarkBubbleView::GetTitle() { |
| 309 BookmarkModel* bookmark_model = | 316 BookmarkModel* bookmark_model = |
| 310 BookmarkModelFactory::GetForBrowserContext(profile_); | 317 BookmarkModelFactory::GetForBrowserContext(profile_); |
| 311 const BookmarkNode* node = | 318 const BookmarkNode* node = |
| 312 bookmark_model->GetMostRecentlyAddedUserNodeForURL(url_); | 319 bookmark_model->GetMostRecentlyAddedUserNodeForURL(url_); |
| 313 if (node) | 320 if (node) |
| 314 return node->GetTitle(); | 321 return node->GetTitle(); |
| 315 else | 322 else |
| 316 NOTREACHED(); | 323 NOTREACHED(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 407 RemoveChildView(bookmark_details_view_.get()); | 414 RemoveChildView(bookmark_details_view_.get()); |
| 408 is_showing_ios_promotion_ = true; | 415 is_showing_ios_promotion_ = true; |
| 409 ios_promo_view_ = new DesktopIOSPromotionBubbleView( | 416 ios_promo_view_ = new DesktopIOSPromotionBubbleView( |
| 410 profile_, desktop_ios_promotion::PromotionEntryPoint::BOOKMARKS_BUBBLE); | 417 profile_, desktop_ios_promotion::PromotionEntryPoint::BOOKMARKS_BUBBLE); |
| 411 AddChildView(ios_promo_view_); | 418 AddChildView(ios_promo_view_); |
| 412 GetWidget()->UpdateWindowIcon(); | 419 GetWidget()->UpdateWindowIcon(); |
| 413 GetWidget()->UpdateWindowTitle(); | 420 GetWidget()->UpdateWindowTitle(); |
| 414 SizeToContents(); | 421 SizeToContents(); |
| 415 } | 422 } |
| 416 #endif | 423 #endif |
| OLD | NEW |