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

Unified Diff: chrome/browser/ui/views/location_bar/keyword_hint_view.h

Issue 2792103005: Make keyword hint view ("press tab to search foo.com") clickable. (Closed)
Patch Set: elaborate on comment Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/keyword_hint_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/keyword_hint_view.h
diff --git a/chrome/browser/ui/views/location_bar/keyword_hint_view.h b/chrome/browser/ui/views/location_bar/keyword_hint_view.h
index 18209417a9377384b84439d8c8b614e2830b6c19..c4628c2944f644531043e44a91f1a918d6259fb3 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.h
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.h
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/gfx/geometry/size.h"
-#include "ui/views/view.h"
+#include "ui/views/controls/button/custom_button.h"
class Profile;
@@ -23,16 +23,18 @@ class Label;
}
// KeywordHintView is used by the location bar view to display a hint to the
-// user when the selected url has a corresponding keyword.
+// user that pressing Tab will enter tab to search mode. The view is also
+// clickable, which has the same effect as pressing tab.
//
// Internally KeywordHintView uses two labels to render the text, and draws
// the tab image itself.
//
// NOTE: This should really be called LocationBarKeywordHintView, but I
// couldn't bring myself to use such a long name.
-class KeywordHintView : public views::View {
+class KeywordHintView : public views::CustomButton {
public:
- KeywordHintView(Profile* profile,
+ KeywordHintView(views::ButtonListener* listener,
+ Profile* profile,
const gfx::FontList& font_list,
const gfx::FontList& bubble_font_list,
int tab_key_height,
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/keyword_hint_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698