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

Side by Side Diff: ui/app_list/search_box_model.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/app_list/search/tokenized_string_char_iterator.h ('k') | ui/app_list/search_box_model.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 UI_APP_LIST_SEARCH_BOX_MODEL_H_ 5 #ifndef UI_APP_LIST_SEARCH_BOX_MODEL_H_
6 #define UI_APP_LIST_SEARCH_BOX_MODEL_H_ 6 #define UI_APP_LIST_SEARCH_BOX_MODEL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 SearchBoxModel(); 47 SearchBoxModel();
48 ~SearchBoxModel(); 48 ~SearchBoxModel();
49 49
50 // Sets/gets the icon on the left side of edit box. 50 // Sets/gets the icon on the left side of edit box.
51 void SetIcon(const gfx::ImageSkia& icon); 51 void SetIcon(const gfx::ImageSkia& icon);
52 const gfx::ImageSkia& icon() const { return icon_; } 52 const gfx::ImageSkia& icon() const { return icon_; }
53 53
54 // Sets/gets the properties for the button of speech recognition. 54 // Sets/gets the properties for the button of speech recognition.
55 void SetSpeechRecognitionButton( 55 void SetSpeechRecognitionButton(
56 scoped_ptr<SpeechButtonProperty> speech_button); 56 std::unique_ptr<SpeechButtonProperty> speech_button);
57 const SpeechButtonProperty* speech_button() const { 57 const SpeechButtonProperty* speech_button() const {
58 return speech_button_.get(); 58 return speech_button_.get();
59 } 59 }
60 60
61 // Sets/gets the hint text to display when there is in input. 61 // Sets/gets the hint text to display when there is in input.
62 void SetHintText(const base::string16& hint_text); 62 void SetHintText(const base::string16& hint_text);
63 const base::string16& hint_text() const { return hint_text_; } 63 const base::string16& hint_text() const { return hint_text_; }
64 64
65 // Sets/gets the text for screen readers on the search box. 65 // Sets/gets the text for screen readers on the search box.
66 void SetAccessibleName(const base::string16& accessible_name); 66 void SetAccessibleName(const base::string16& accessible_name);
67 const base::string16& accessible_name() const { return accessible_name_; } 67 const base::string16& accessible_name() const { return accessible_name_; }
68 68
69 // Sets/gets the selection model for the search box's Textfield. 69 // Sets/gets the selection model for the search box's Textfield.
70 void SetSelectionModel(const gfx::SelectionModel& sel); 70 void SetSelectionModel(const gfx::SelectionModel& sel);
71 const gfx::SelectionModel& selection_model() const { 71 const gfx::SelectionModel& selection_model() const {
72 return selection_model_; 72 return selection_model_;
73 } 73 }
74 74
75 // Sets/gets the text for the search box's Textfield. 75 // Sets/gets the text for the search box's Textfield.
76 void SetText(const base::string16& text); 76 void SetText(const base::string16& text);
77 const base::string16& text() const { return text_; } 77 const base::string16& text() const { return text_; }
78 78
79 void AddObserver(SearchBoxModelObserver* observer); 79 void AddObserver(SearchBoxModelObserver* observer);
80 void RemoveObserver(SearchBoxModelObserver* observer); 80 void RemoveObserver(SearchBoxModelObserver* observer);
81 81
82 private: 82 private:
83 gfx::ImageSkia icon_; 83 gfx::ImageSkia icon_;
84 scoped_ptr<SpeechButtonProperty> speech_button_; 84 std::unique_ptr<SpeechButtonProperty> speech_button_;
85 base::string16 hint_text_; 85 base::string16 hint_text_;
86 base::string16 accessible_name_; 86 base::string16 accessible_name_;
87 gfx::SelectionModel selection_model_; 87 gfx::SelectionModel selection_model_;
88 base::string16 text_; 88 base::string16 text_;
89 89
90 base::ObserverList<SearchBoxModelObserver> observers_; 90 base::ObserverList<SearchBoxModelObserver> observers_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(SearchBoxModel); 92 DISALLOW_COPY_AND_ASSIGN(SearchBoxModel);
93 }; 93 };
94 94
95 } // namespace app_list 95 } // namespace app_list
96 96
97 #endif // UI_APP_LIST_SEARCH_BOX_MODEL_H_ 97 #endif // UI_APP_LIST_SEARCH_BOX_MODEL_H_
OLDNEW
« no previous file with comments | « ui/app_list/search/tokenized_string_char_iterator.h ('k') | ui/app_list/search_box_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698