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

Unified Diff: chrome/browser/ui/views/ime/ime_warning_bubble_view.cc

Issue 2902873002: Views/Harmony Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Fix patch failures. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/importer/import_lock_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
diff --git a/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc b/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
index 24c019ce01ce0e4e4e800b623fcb45242b959774..4233f2684b18c0c06121867e248d5f61fab6dadc 100644
--- a/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
+++ b/chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/browser/ui/views/harmony/chrome_typography.h"
#include "chrome/browser/ui/views/toolbar/app_menu_button.h"
#include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
@@ -21,7 +22,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/button/checkbox.h"
-#include "ui/views/layout/layout_constants.h"
using extensions::Extension;
@@ -174,20 +174,23 @@ void ImeWarningBubbleView::InitLayout() {
main_cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
views::GridLayout::FIXED, kColumnWidth, 0);
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+ const int vertical_spacing =
+ provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL);
layout->StartRow(0, cs_id);
base::string16 extension_name = base::UTF8ToUTF16(extension_->name());
base::i18n::AdjustStringForLocaleDirection(&extension_name);
views::Label* warning = CreateExtensionNameLabel(l10n_util::GetStringFUTF16(
IDS_IME_API_ACTIVATED_WARNING, extension_name));
layout->AddView(warning);
- layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
+ layout->AddPaddingRow(0, vertical_spacing);
// The seconde row which shows the check box.
layout->StartRow(0, cs_id);
never_show_checkbox_ =
new views::Checkbox(l10n_util::GetStringUTF16(IDS_IME_API_NEVER_SHOW));
layout->AddView(never_show_checkbox_);
- layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
+ layout->AddPaddingRow(0, vertical_spacing);
}
bool ImeWarningBubbleView::IsToolbarAnimating() {
« no previous file with comments | « no previous file | chrome/browser/ui/views/importer/import_lock_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698