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

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

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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TOUCHABLE_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TOUCHABLE_LOCATION_BAR_VIEW_H_
7
8 #include "ui/views/view.h"
9
10 // An interface for a View in within the LocationBar that knows how to
11 // increase its size (without affecting visual layout) in a touch
12 // layout, to increase the size of the touch target. Its border
13 // extends a few pixels up and down, which doesn't affect layout, and
14 // extends half of the padding used between items in the location bar
15 // to the left and right.
16 //
17 // To make your location bar View extend itself into the padding
18 // around it to get an enlarged touch target, inherit from
19 // TouchableLocationBarView interface, implement its
20 // GetBuiltInHorizontalPadding method by calling
21 // GetBuiltInHorizontalPaddingImpl, and call
22 // TouchableLocationBarView::Init() from your constructor.
23 class TouchableLocationBarView {
24 public:
25 // Returns the number of pixels of built-in padding to the left and
26 // right of the image for this view.
27 virtual int GetBuiltInHorizontalPadding() const = 0;
28
29 protected:
30 // Call this from the constructor (or during early initialization)
31 // of a class that inherits from TouchableLocationBarView.
32 static void Init(views::View* view);
33
34 // Use this to implement GetBuiltInHorizontalPadding().
35 static int GetBuiltInHorizontalPaddingImpl();
36 };
37
38 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TOUCHABLE_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.cc ('k') | chrome/browser/ui/views/location_bar/touchable_location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698