| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 | 158 |
| 159 int ViewsDelegate::GetDialogButtonMinimumWidth() const { | 159 int ViewsDelegate::GetDialogButtonMinimumWidth() const { |
| 160 return kDialogMinimumButtonWidth; | 160 return kDialogMinimumButtonWidth; |
| 161 } | 161 } |
| 162 | 162 |
| 163 int ViewsDelegate::GetButtonHorizontalPadding() const { | 163 int ViewsDelegate::GetButtonHorizontalPadding() const { |
| 164 return kButtonHorizontalPadding; | 164 return kButtonHorizontalPadding; |
| 165 } | 165 } |
| 166 | 166 |
| 167 gfx::Insets ViewsDelegate::GetButtonMargins() const { |
| 168 return gfx::Insets(kButtonExtraTouchSize); |
| 169 } |
| 170 |
| 167 ViewsDelegate::ViewsDelegate() | 171 ViewsDelegate::ViewsDelegate() |
| 168 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { | 172 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { |
| 169 DCHECK(!views_delegate); | 173 DCHECK(!views_delegate); |
| 170 views_delegate = this; | 174 views_delegate = this; |
| 171 | 175 |
| 172 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); | 176 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); |
| 173 | 177 |
| 174 #if defined(USE_AURA) | 178 #if defined(USE_AURA) |
| 175 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); | 179 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); |
| 176 #endif | 180 #endif |
| 177 } | 181 } |
| 178 | 182 |
| 179 } // namespace views | 183 } // namespace views |
| OLD | NEW |