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

Side by Side Diff: ui/views/views_delegate.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
« no previous file with comments | « ui/views/views_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 gfx::Insets ViewsDelegate::GetInsetsMetric(InsetsMetric metric) const { 129 gfx::Insets ViewsDelegate::GetInsetsMetric(InsetsMetric metric) const {
130 switch (metric) { 130 switch (metric) {
131 case InsetsMetric::DIALOG_BUTTON: 131 case InsetsMetric::DIALOG_BUTTON:
132 return gfx::Insets(0, kButtonHEdgeMarginNew, kButtonVEdgeMarginNew, 132 return gfx::Insets(0, kButtonHEdgeMarginNew, kButtonVEdgeMarginNew,
133 kButtonHEdgeMarginNew); 133 kButtonHEdgeMarginNew);
134 case InsetsMetric::DIALOG_FRAME_VIEW: 134 case InsetsMetric::DIALOG_FRAME_VIEW:
135 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0, 135 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0,
136 kButtonHEdgeMarginNew); 136 kButtonHEdgeMarginNew);
137 case InsetsMetric::BUBBLE_DIALOG: 137 case InsetsMetric::BUBBLE_DIALOG:
138 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin); 138 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
139 case InsetsMetric::PANEL:
140 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew);
139 case InsetsMetric::VECTOR_IMAGE_BUTTON_PADDING: 141 case InsetsMetric::VECTOR_IMAGE_BUTTON_PADDING:
140 return gfx::Insets(kVectorButtonExtraTouchSize); 142 return gfx::Insets(kVectorButtonExtraTouchSize);
141 } 143 }
142 NOTREACHED(); 144 NOTREACHED();
143 return gfx::Insets(); 145 return gfx::Insets();
144 } 146 }
145 147
146 int ViewsDelegate::GetDistanceMetric(DistanceMetric metric) const { 148 int ViewsDelegate::GetDistanceMetric(DistanceMetric metric) const {
147 switch (metric) { 149 switch (metric) {
148 case DistanceMetric::CLOSE_BUTTON_MARGIN: 150 case DistanceMetric::CLOSE_BUTTON_MARGIN:
(...skipping 19 matching lines...) Expand all
168 views_delegate = this; 170 views_delegate = this;
169 171
170 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); 172 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
171 173
172 #if defined(USE_AURA) 174 #if defined(USE_AURA)
173 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); 175 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
174 #endif 176 #endif
175 } 177 }
176 178
177 } // namespace views 179 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698