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

Side by Side Diff: chrome/browser/ui/views/location_bar/touchable_location_bar_view.cc

Issue 21696003: views/location_bar: Eliminate TouchableLocationBarView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix wrapping Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
(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 // static
12 void TouchableLocationBarView::Init(views::View* view) {
13 int horizontal_padding = GetBuiltInHorizontalPaddingImpl();
14 if (horizontal_padding != 0) {
15 view->set_border(views::Border::CreateEmptyBorder(
16 3, horizontal_padding, 3, horizontal_padding));
17 }
18 }
19
20 // static
21 int TouchableLocationBarView::GetBuiltInHorizontalPaddingImpl() {
22 return ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ?
23 LocationBarView::GetItemPadding() / 2 : 0;
24 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/touchable_location_bar_view.h ('k') | chrome/browser/ui/views/location_bar/zoom_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698