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

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

Issue 6306011: Remove wstring from autocomplete. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Property Changes:
Deleted: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SELECTED_KEYWORD_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 Profile* profile); 26 Profile* profile);
27 virtual ~SelectedKeywordView(); 27 virtual ~SelectedKeywordView();
28 28
29 void SetFont(const gfx::Font& font); 29 void SetFont(const gfx::Font& font);
30 30
31 virtual gfx::Size GetPreferredSize(); 31 virtual gfx::Size GetPreferredSize();
32 virtual gfx::Size GetMinimumSize(); 32 virtual gfx::Size GetMinimumSize();
33 virtual void Layout(); 33 virtual void Layout();
34 34
35 // The current keyword, or an empty string if no keyword is displayed. 35 // The current keyword, or an empty string if no keyword is displayed.
36 void SetKeyword(const std::wstring& keyword); 36 void SetKeyword(const string16& keyword);
37 std::wstring keyword() const { return keyword_; } 37 string16 keyword() const { return keyword_; }
38 38
39 void set_profile(Profile* profile) { profile_ = profile; } 39 void set_profile(Profile* profile) { profile_ = profile; }
40 40
41 private: 41 private:
42 // The keyword we're showing. If empty, no keyword is selected. 42 // The keyword we're showing. If empty, no keyword is selected.
43 // NOTE: we don't cache the TemplateURL as it is possible for it to get 43 // NOTE: we don't cache the TemplateURL as it is possible for it to get
44 // deleted out from under us. 44 // deleted out from under us.
45 std::wstring keyword_; 45 string16 keyword_;
46 46
47 // These labels are never visible. They are used to size the view. One 47 // These labels are never visible. They are used to size the view. One
48 // label contains the complete description of the keyword, the second 48 // label contains the complete description of the keyword, the second
49 // contains a truncated version of the description, for if there is not 49 // contains a truncated version of the description, for if there is not
50 // enough room to display the complete description. 50 // enough room to display the complete description.
51 views::Label full_label_; 51 views::Label full_label_;
52 views::Label partial_label_; 52 views::Label partial_label_;
53 53
54 Profile* profile_; 54 Profile* profile_;
55 55
56 DISALLOW_IMPLICIT_CONSTRUCTORS(SelectedKeywordView); 56 DISALLOW_IMPLICIT_CONSTRUCTORS(SelectedKeywordView);
57 }; 57 };
58 58
59 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ 59 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698