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 "base/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 views::Label* combobox_label = new views::Label( | 330 views::Label* combobox_label = new views::Label( |
| 331 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_LABEL)); | 331 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_LABEL)); |
| 332 layout->AddView(combobox_label); | 332 layout->AddView(combobox_label); |
| 333 | 333 |
| 334 parent_combobox_ = new UnsizedCombobox(&parent_model_); | 334 parent_combobox_ = new UnsizedCombobox(&parent_model_); |
| 335 parent_combobox_->set_listener(this); | 335 parent_combobox_->set_listener(this); |
| 336 parent_combobox_->SetAccessibleName( | 336 parent_combobox_->SetAccessibleName( |
| 337 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_BUBBLE_FOLDER_LABEL)); | 337 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_BUBBLE_FOLDER_LABEL)); |
| 338 layout->AddView(parent_combobox_); | 338 layout->AddView(parent_combobox_); |
| 339 | 339 |
| 340 layout->AddPaddingRow( | 340 if (provider->UseExtraDialogPadding()) { |
|
Bret
2017/06/07 22:52:18
This is redundant post-Harmony with the new paddin
| |
| 341 kFixed, | 341 layout->AddPaddingRow( |
| 342 provider->GetInsetsMetric(views::INSETS_DIALOG_CONTENTS).bottom()); | 342 kFixed, |
| 343 provider->GetInsetsMetric(views::INSETS_DIALOG_CONTENTS).bottom()); | |
| 344 } | |
| 343 | 345 |
| 344 AddChildView(bookmark_contents_view_); | 346 AddChildView(bookmark_contents_view_); |
| 345 } | 347 } |
| 346 | 348 |
| 347 // Private methods ------------------------------------------------------------- | 349 // Private methods ------------------------------------------------------------- |
| 348 | 350 |
| 349 BookmarkBubbleView::BookmarkBubbleView( | 351 BookmarkBubbleView::BookmarkBubbleView( |
| 350 views::View* anchor_view, | 352 views::View* anchor_view, |
| 351 bookmarks::BookmarkBubbleObserver* observer, | 353 bookmarks::BookmarkBubbleObserver* observer, |
| 352 std::unique_ptr<BubbleSyncPromoDelegate> delegate, | 354 std::unique_ptr<BubbleSyncPromoDelegate> delegate, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 footnote_view_ = nullptr; | 437 footnote_view_ = nullptr; |
| 436 is_showing_ios_promotion_ = true; | 438 is_showing_ios_promotion_ = true; |
| 437 ios_promo_view_ = new DesktopIOSPromotionBubbleView(profile_, entry_point); | 439 ios_promo_view_ = new DesktopIOSPromotionBubbleView(profile_, entry_point); |
| 438 AddChildView(ios_promo_view_); | 440 AddChildView(ios_promo_view_); |
| 439 GetWidget()->UpdateWindowIcon(); | 441 GetWidget()->UpdateWindowIcon(); |
| 440 GetWidget()->UpdateWindowTitle(); | 442 GetWidget()->UpdateWindowTitle(); |
| 441 GetDialogClientView()->UpdateDialogButtons(); | 443 GetDialogClientView()->UpdateDialogButtons(); |
| 442 SizeToContents(); | 444 SizeToContents(); |
| 443 } | 445 } |
| 444 #endif | 446 #endif |
| OLD | NEW |