OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/views/views_delegate.h" | 5 #include "ui/views/views_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ui/views/layout/layout_constants.h" | 9 #include "ui/views/layout/layout_constants.h" |
10 #include "ui/views/views_touch_selection_controller_factory.h" | 10 #include "ui/views/views_touch_selection_controller_factory.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 | 128 |
129 gfx::Insets ViewsDelegate::GetDialogButtonInsets() { | 129 gfx::Insets ViewsDelegate::GetDialogButtonInsets() { |
130 return gfx::Insets(0, kButtonHEdgeMarginNew, kButtonVEdgeMarginNew, | 130 return gfx::Insets(0, kButtonHEdgeMarginNew, kButtonVEdgeMarginNew, |
131 kButtonHEdgeMarginNew); | 131 kButtonHEdgeMarginNew); |
132 } | 132 } |
133 | 133 |
134 int ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { | 134 int ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { |
135 return kRelatedButtonHSpacing; | 135 return kRelatedButtonHSpacing; |
136 } | 136 } |
137 | 137 |
138 int ViewsDelegate::GetDialogRelatedControlVerticalSpacing() { | |
139 return kRelatedControlVerticalSpacing; | |
140 } | |
141 | |
138 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() { | 142 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() { |
139 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0, | 143 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0, |
140 kButtonHEdgeMarginNew); | 144 kButtonHEdgeMarginNew); |
141 } | 145 } |
142 | 146 |
147 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() { | |
148 return gfx::Insets(kPanelVertMargin, | |
msw
2017/01/06 23:17:43
optional nit: use the ctor that takes |vertical|,
kylix_rd
2017/01/10 14:36:44
Done.
| |
149 kPanelHorizMargin, | |
150 kPanelVertMargin, | |
151 kPanelHorizMargin); | |
152 } | |
153 | |
143 ViewsDelegate::ViewsDelegate() | 154 ViewsDelegate::ViewsDelegate() |
144 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { | 155 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { |
145 DCHECK(!views_delegate); | 156 DCHECK(!views_delegate); |
146 views_delegate = this; | 157 views_delegate = this; |
147 | 158 |
148 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); | 159 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); |
149 | 160 |
150 #if defined(USE_AURA) | 161 #if defined(USE_AURA) |
151 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); | 162 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); |
152 #endif | 163 #endif |
153 } | 164 } |
154 | 165 |
155 } // namespace views | 166 } // namespace views |
OLD | NEW |