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

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

Issue 10519008: Enlarge size of touch target for several location bar buttons without affecting visual layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge to LKGR Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/command_updater.h" 9 #include "chrome/browser/command_updater.h"
10 #include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h"
10 #include "ui/views/controls/image_view.h" 11 #include "ui/views/controls/image_view.h"
11 12
12 class LocationBarView; 13 class LocationBarView;
13 14
14 namespace views { 15 namespace views {
15 class KeyEvent; 16 class KeyEvent;
16 class MouseEvent; 17 class MouseEvent;
17 } 18 }
18 19
19 // A Page Action image view for the Chrome To Mobile bubble. 20 // A Page Action image view for the Chrome To Mobile bubble.
20 class ChromeToMobileView : public views::ImageView, 21 class ChromeToMobileView : public views::ImageView,
21 public CommandUpdater::CommandObserver { 22 public CommandUpdater::CommandObserver,
23 public TouchableLocationBarView {
22 public: 24 public:
23 ChromeToMobileView(LocationBarView* location_bar_view, 25 ChromeToMobileView(LocationBarView* location_bar_view,
24 CommandUpdater* command_updater); 26 CommandUpdater* command_updater);
25 virtual ~ChromeToMobileView(); 27 virtual ~ChromeToMobileView();
26 28
27 // CommandUpdater::CommandObserver overrides: 29 // CommandUpdater::CommandObserver overrides:
28 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; 30 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE;
29 31
32 // TouchableLocationBarView.
33 virtual int GetBuiltInHorizontalPadding() const OVERRIDE;
34
30 private: 35 private:
31 // views::ImageView overrides: 36 // views::ImageView overrides:
32 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 37 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
33 virtual bool GetTooltipText(const gfx::Point& p, 38 virtual bool GetTooltipText(const gfx::Point& p,
34 string16* tooltip) const OVERRIDE; 39 string16* tooltip) const OVERRIDE;
35 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 40 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
36 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 41 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
37 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; 42 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
38 43
39 // The LocationBarView hosting this view. 44 // The LocationBarView hosting this view.
40 LocationBarView* location_bar_view_; 45 LocationBarView* location_bar_view_;
41 46
42 // The CommandUpdater for the Browser object that owns the location bar. 47 // The CommandUpdater for the Browser object that owns the location bar.
43 CommandUpdater* command_updater_; 48 CommandUpdater* command_updater_;
44 49
45 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeToMobileView); 50 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeToMobileView);
46 }; 51 };
47 52
48 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_ 53 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698