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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2660553005: Harmony - convert hung renderer dialog. (Closed)
Patch Set: comments 1 Created 3 years, 11 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
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 88741a15dc8edce8caa5472b33bda44f58baf480..bd16e370dadd11eb45a4093346901f3e6eba968b 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/browser_window_state.h"
#include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/layout_delegate.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
@@ -548,15 +549,17 @@ gfx::Insets ChromeViewsDelegate::GetDialogButtonInsets() {
}
int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() {
- if (ui::MaterialDesignController::IsSecondaryUiMaterial())
- return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
- return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing();
+ return LayoutDelegate::Get()->GetLayoutDistance(
+ LayoutDelegate::LayoutDistanceType::RELATED_BUTTON_HORIZONTAL_SPACING);
Peter Kasting 2017/02/02 00:32:30 I think these two functions' changes should be lan
Bret 2017/02/03 01:47:17 Done, all merged.
}
int ChromeViewsDelegate::GetDialogRelatedControlVerticalSpacing() {
- if (ui::MaterialDesignController::IsSecondaryUiMaterial())
- return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
- return ViewsDelegate::GetDialogRelatedControlVerticalSpacing();
+ return LayoutDelegate::Get()->GetLayoutDistance(
+ LayoutDelegate::LayoutDistanceType::RELATED_CONTROL_VERTICAL_SPACING);
+}
+
+int ChromeViewsDelegate::GetDialogButtonMinimumWidth() {
+ return LayoutDelegate::Get()->GetDialogButtonMinimumWidth();
}
gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() {

Powered by Google App Engine
This is Rietveld 408576698