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

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

Issue 2666803005: Position close buttons in bubbles based on a layout delegate constant. (Closed)
Patch Set: Remove extraneous brace 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
« ui/views/views_delegate.h ('K') | « 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() { 147 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() {
148 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin); 148 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
149 } 149 }
150 150
151 gfx::Insets ViewsDelegate::GetButtonPadding() const { 151 gfx::Insets ViewsDelegate::GetButtonPadding() const {
152 return gfx::Insets(kButtonExtraTouchSize); 152 return gfx::Insets(kButtonExtraTouchSize);
153 } 153 }
154 154
155 int ViewsDelegate::GetCloseButtonMargin() const {
156 return kCloseButtonMargin;
157 }
158
155 ViewsDelegate::ViewsDelegate() 159 ViewsDelegate::ViewsDelegate()
156 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { 160 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) {
157 DCHECK(!views_delegate); 161 DCHECK(!views_delegate);
158 views_delegate = this; 162 views_delegate = this;
159 163
160 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); 164 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
161 165
162 #if defined(USE_AURA) 166 #if defined(USE_AURA)
163 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); 167 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
164 #endif 168 #endif
165 } 169 }
166 170
167 } // namespace views 171 } // namespace views
OLDNEW
« ui/views/views_delegate.h ('K') | « ui/views/views_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698