| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h" |
| 6 |
| 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 8 #include "ui/base/layout.h" |
| 9 #include "ui/views/border.h" |
| 10 |
| 11 void TouchableLocationBarViewBase::Init() { |
| 12 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { |
| 13 SetBorder(3, touch_horizontal_padding()); |
| 14 } |
| 15 } |
| 16 |
| 17 int TouchableLocationBarViewBase::GetBuiltInHorizontalPadding() const { |
| 18 return ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ? |
| 19 touch_horizontal_padding() : 0; |
| 20 } |
| 21 |
| 22 int TouchableLocationBarViewBase::touch_horizontal_padding() const { |
| 23 return LocationBarView::GetItemPadding() / 2; |
| 24 } |
| OLD | NEW |