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

Unified Diff: ui/views/window/dialog_delegate.cc

Issue 11421164: Migrate CollectedCookiesViews to Chrome style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_delegate.cc
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index 9f005d82e80e6deb6a1de8329574db5ca00039de..ff7acde8535cd9e502321f5190dd1920596f2681 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -49,6 +49,13 @@ bool DialogDelegate::UseChromeStyle() const {
return false;
}
+void DialogDelegate::GetChromeStyleMargins(int* vertical_edge,
+ int* horizontal_edge) const {
+ DCHECK(vertical_edge);
+ DCHECK(horizontal_edge);
+ *vertical_edge = *horizontal_edge = 0;
+}
+
bool DialogDelegate::AreAcceleratorsEnabled(ui::DialogButton button) {
return true;
}
@@ -94,9 +101,14 @@ View* DialogDelegate::GetInitiallyFocusedView() {
}
ClientView* DialogDelegate::CreateClientView(Widget* widget) {
- DialogClientView::StyleParams params = UseChromeStyle() ?
- DialogClientView::GetChromeStyleParams() :
- DialogClientView::StyleParams();
+ DialogClientView::StyleParams params;
+
+ if (UseChromeStyle()) {
+ int button_vedge_margin, button_hedge_margin;
+ GetChromeStyleMargins(&button_vedge_margin, &button_hedge_margin);
+ params = DialogClientView::GetChromeStyleParams(button_vedge_margin,
+ button_hedge_margin);
+ }
return new DialogClientView(widget, GetContentsView(), params);
}
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698