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

Side by Side Diff: chrome/browser/views/location_bar/keyword_hint_view.h

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 7 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "gfx/size.h" 10 #include "gfx/size.h"
(...skipping 28 matching lines...) Expand all
39 std::wstring keyword() const { return keyword_; } 39 std::wstring keyword() const { return keyword_; }
40 40
41 virtual void Paint(gfx::Canvas* canvas); 41 virtual void Paint(gfx::Canvas* canvas);
42 virtual gfx::Size GetPreferredSize(); 42 virtual gfx::Size GetPreferredSize();
43 // The minimum size is just big enough to show the tab. 43 // The minimum size is just big enough to show the tab.
44 virtual gfx::Size GetMinimumSize(); 44 virtual gfx::Size GetMinimumSize();
45 virtual void Layout(); 45 virtual void Layout();
46 46
47 void set_profile(Profile* profile) { profile_ = profile; } 47 void set_profile(Profile* profile) { profile_ = profile; }
48 48
49 // Returns the short name for a keyword.
50 static std::wstring GetKeywordName(Profile* profile,
51 const std::wstring& keyword);
52
53 private: 49 private:
54 views::Label* leading_label_; 50 views::Label* leading_label_;
55 views::Label* trailing_label_; 51 views::Label* trailing_label_;
56 52
57 // The keyword. 53 // The keyword.
58 std::wstring keyword_; 54 std::wstring keyword_;
59 55
60 Profile* profile_; 56 Profile* profile_;
61 57
62 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); 58 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView);
63 }; 59 };
64 60
65 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ 61 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_table_model.cc ('k') | chrome/browser/views/location_bar/keyword_hint_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698