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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2571613002: Convert Register Protocol Handler dialog for Harmony/Material Design (Closed)
Patch Set: More fixed nits 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 unified diff | Download patch
OLDNEW
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/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); 541 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit);
542 return ViewsDelegate::GetDialogButtonInsets(); 542 return ViewsDelegate::GetDialogButtonInsets();
543 } 543 }
544 544
545 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { 545 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() {
546 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) 546 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
547 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; 547 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
548 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing(); 548 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing();
549 } 549 }
550 550
551 int ChromeViewsDelegate::GetDialogRelatedControlVerticalSpacing() {
552 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
553 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2;
554 return ViewsDelegate::GetDialogRelatedControlVerticalSpacing();
555 }
556
551 gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() { 557 gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() {
552 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { 558 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
553 // Titles are inset at the top and sides, but not at the bottom. 559 // Titles are inset at the top and sides, but not at the bottom.
554 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit, 560 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit,
555 HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0, 561 HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0,
556 HarmonyLayoutDelegate::kHarmonyLayoutUnit); 562 HarmonyLayoutDelegate::kHarmonyLayoutUnit);
557 }
558 return ViewsDelegate::GetDialogFrameViewInsets(); 563 return ViewsDelegate::GetDialogFrameViewInsets();
559 } 564 }
560 565
566 gfx::Insets ChromeViewsDelegate::GetBubbleDialogMargins() {
567 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
568 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit);
569 return ViewsDelegate::GetBubbleDialogMargins();
570 }
571
561 #if !defined(USE_ASH) 572 #if !defined(USE_ASH)
562 views::Widget::InitParams::WindowOpacity 573 views::Widget::InitParams::WindowOpacity
563 ChromeViewsDelegate::GetOpacityForInitParams( 574 ChromeViewsDelegate::GetOpacityForInitParams(
564 const views::Widget::InitParams& params) { 575 const views::Widget::InitParams& params) {
565 return views::Widget::InitParams::OPAQUE_WINDOW; 576 return views::Widget::InitParams::OPAQUE_WINDOW;
566 } 577 }
567 #endif 578 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | chrome/browser/ui/views/content_setting_bubble_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698