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

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

Issue 2664073006: Implement ChromeViewsDelegate methods in terms of LayoutDelegate where possible. (Closed)
Patch Set: Now with correct type names Created 3 years, 10 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor, 119 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
120 const base::Closure& callback) { 120 const base::Closure& callback) {
121 return EDGE_BOTTOM; 121 return EDGE_BOTTOM;
122 } 122 }
123 #endif 123 #endif
124 124
125 scoped_refptr<base::TaskRunner> ViewsDelegate::GetBlockingPoolTaskRunner() { 125 scoped_refptr<base::TaskRunner> ViewsDelegate::GetBlockingPoolTaskRunner() {
126 return nullptr; 126 return nullptr;
127 } 127 }
128 128
129 gfx::Insets ViewsDelegate::GetDialogButtonInsets() { 129 gfx::Insets ViewsDelegate::GetDialogButtonInsets() const {
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() const {
135 return kRelatedButtonHSpacing; 135 return kRelatedButtonHSpacing;
136 } 136 }
137 137
138 int ViewsDelegate::GetDialogRelatedControlVerticalSpacing() { 138 int ViewsDelegate::GetDialogRelatedControlVerticalSpacing() const {
139 return kRelatedControlVerticalSpacing; 139 return kRelatedControlVerticalSpacing;
140 } 140 }
141 141
142 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() { 142 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() const {
143 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0, 143 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0,
144 kButtonHEdgeMarginNew); 144 kButtonHEdgeMarginNew);
145 } 145 }
146 146
147 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() { 147 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() const {
148 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin); 148 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
149 } 149 }
150 150
151 ViewsDelegate::ViewsDelegate() 151 ViewsDelegate::ViewsDelegate()
152 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { 152 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) {
153 DCHECK(!views_delegate); 153 DCHECK(!views_delegate);
154 views_delegate = this; 154 views_delegate = this;
155 155
156 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); 156 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
157 157
158 #if defined(USE_AURA) 158 #if defined(USE_AURA)
159 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); 159 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
160 #endif 160 #endif
161 } 161 }
162 162
163 } // namespace views 163 } // namespace views
OLDNEW
« chrome/browser/ui/views/chrome_views_delegate.cc ('K') | « ui/views/views_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698