| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return kRelatedControlVerticalSpacing; | 153 return kRelatedControlVerticalSpacing; |
| 154 case DistanceMetric::DIALOG_BUTTON_MINIMUM_WIDTH: | 154 case DistanceMetric::DIALOG_BUTTON_MINIMUM_WIDTH: |
| 155 return kDialogMinimumButtonWidth; | 155 return kDialogMinimumButtonWidth; |
| 156 case DistanceMetric::BUTTON_HORIZONTAL_PADDING: | 156 case DistanceMetric::BUTTON_HORIZONTAL_PADDING: |
| 157 return kButtonHorizontalPadding; | 157 return kButtonHorizontalPadding; |
| 158 } | 158 } |
| 159 NOTREACHED(); | 159 NOTREACHED(); |
| 160 return 0; | 160 return 0; |
| 161 } | 161 } |
| 162 | 162 |
| 163 int ViewsDelegate::GetSnappedDialogWidth(int width) const { |
| 164 return width; |
| 165 } |
| 166 |
| 163 ViewsDelegate::ViewsDelegate() | 167 ViewsDelegate::ViewsDelegate() |
| 164 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { | 168 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { |
| 165 DCHECK(!views_delegate); | 169 DCHECK(!views_delegate); |
| 166 views_delegate = this; | 170 views_delegate = this; |
| 167 | 171 |
| 168 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); | 172 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); |
| 169 | 173 |
| 170 #if defined(USE_AURA) | 174 #if defined(USE_AURA) |
| 171 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); | 175 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); |
| 172 #endif | 176 #endif |
| 173 } | 177 } |
| 174 | 178 |
| 175 } // namespace views | 179 } // namespace views |
| OLD | NEW |