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

Unified Diff: chrome/browser/ui/views/location_bar/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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index d9e50db3f37f4fe399511420c8e021dcef1eb409..0bd5032c4dff55349500dac803cdbd3663bff2d1 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -42,7 +42,6 @@ class GURL;
class InstantController;
class KeywordHintView;
class LocationIconView;
-class MicSearchView;
class OpenPDFInReaderView;
class PageActionWithBadgeView;
class PageActionImageView;
@@ -55,6 +54,7 @@ class ZoomView;
namespace views {
class BubbleDelegateView;
+class ImageButton;
class Label;
class Widget;
}
@@ -140,6 +140,12 @@ class LocationBarView : public LocationBar,
virtual ~LocationBarView();
+ // Uses GetBuiltInHorizontalPaddingForChildViews() to optionally add
+ // additional padding (via an empty border) to |view|. This should be called
+ // during creation on all child views which are potentially touchable so that
+ // when touch is enabled they will have sufficient padding.
+ static void InitTouchableLocationBarChildView(views::View* view);
+
// Initializes the LocationBarView.
void Init();
@@ -332,11 +338,10 @@ class LocationBarView : public LocationBar,
// Returns the position and width that the popup should be, and also the left
// edge that the results should align themselves to (which will leave some
// border on the left of the popup).
- void GetOmniboxPopupPositioningInfo(
- gfx::Point* top_left_screen_coord,
- int* popup_width,
- int* left_margin,
- int* right_margin);
+ void GetOmniboxPopupPositioningInfo(gfx::Point* top_left_screen_coord,
+ int* popup_width,
+ int* left_margin,
+ int* right_margin);
// Space between items in the location bar, as well as between items and the
// edges.
@@ -361,6 +366,11 @@ class LocationBarView : public LocationBar,
friend class PageActionWithBadgeView;
typedef std::vector<PageActionWithBadgeView*> PageActionViews;
+ // Returns the number of pixels of built-in padding to the left and right for
+ // child views. This is nonzero when touch UI is enabled so as to space out
+ // child views for easier targeting. See InitTouchableLocationBarChildView().
+ static int GetBuiltInHorizontalPaddingForChildViews();
+
// Returns the thickness of any visible left and right edge, in pixels.
int GetHorizontalEdgeThickness() const;
@@ -474,7 +484,7 @@ class LocationBarView : public LocationBar,
KeywordHintView* keyword_hint_view_;
// The voice search icon.
- MicSearchView* mic_search_view_;
+ views::ImageButton* mic_search_view_;
// The content setting views.
ContentSettingViews content_setting_views_;

Powered by Google App Engine
This is Rietveld 408576698