| 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/views_touch_selection_controller_factory.h" | 10 #include "ui/views/views_touch_selection_controller_factory.h" |
| 10 #include "ui/views/widget/native_widget_private.h" | 11 #include "ui/views/widget/native_widget_private.h" |
| 11 | 12 |
| 12 #if defined(USE_AURA) | 13 #if defined(USE_AURA) |
| 13 #include "ui/views/touchui/touch_selection_menu_runner_views.h" | 14 #include "ui/views/touchui/touch_selection_menu_runner_views.h" |
| 14 #endif | 15 #endif |
| 15 | 16 |
| 16 namespace views { | 17 namespace views { |
| 17 namespace { | 18 namespace { |
| 18 | 19 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor, | 115 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor, |
| 115 const base::Closure& callback) { | 116 const base::Closure& callback) { |
| 116 return EDGE_BOTTOM; | 117 return EDGE_BOTTOM; |
| 117 } | 118 } |
| 118 #endif | 119 #endif |
| 119 | 120 |
| 120 scoped_refptr<base::TaskRunner> ViewsDelegate::GetBlockingPoolTaskRunner() { | 121 scoped_refptr<base::TaskRunner> ViewsDelegate::GetBlockingPoolTaskRunner() { |
| 121 return nullptr; | 122 return nullptr; |
| 122 } | 123 } |
| 123 | 124 |
| 125 gfx::Insets ViewsDelegate::GetDialogButtonInsets() { |
| 126 return gfx::Insets(0, kButtonHEdgeMarginNew, kButtonVEdgeMarginNew, |
| 127 kButtonHEdgeMarginNew); |
| 128 } |
| 129 |
| 130 int ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { |
| 131 return kRelatedButtonHSpacing; |
| 132 } |
| 133 |
| 124 ViewsDelegate::ViewsDelegate() | 134 ViewsDelegate::ViewsDelegate() |
| 125 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { | 135 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { |
| 126 DCHECK(!views_delegate); | 136 DCHECK(!views_delegate); |
| 127 views_delegate = this; | 137 views_delegate = this; |
| 128 | 138 |
| 129 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); | 139 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); |
| 130 | 140 |
| 131 #if defined(USE_AURA) | 141 #if defined(USE_AURA) |
| 132 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); | 142 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); |
| 133 #endif | 143 #endif |
| 134 } | 144 } |
| 135 | 145 |
| 136 } // namespace views | 146 } // namespace views |
| OLD | NEW |