OLD | NEW |
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 #include "ui/app_list/views/search_box_view.h" | 5 #include "ui/app_list/views/search_box_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // does not generate ContentsChanged() notification. | 216 // does not generate ContentsChanged() notification. |
217 UpdateModel(); | 217 UpdateModel(); |
218 NotifyQueryChanged(); | 218 NotifyQueryChanged(); |
219 } | 219 } |
220 | 220 |
221 void SearchBoxView::InvalidateMenu() { | 221 void SearchBoxView::InvalidateMenu() { |
222 menu_.reset(); | 222 menu_.reset(); |
223 } | 223 } |
224 | 224 |
225 void SearchBoxView::SetShadow(const gfx::ShadowValue& shadow) { | 225 void SearchBoxView::SetShadow(const gfx::ShadowValue& shadow) { |
226 SetBorder(base::WrapUnique(new views::ShadowBorder(shadow))); | 226 SetBorder(base::MakeUnique<views::ShadowBorder>(shadow)); |
227 Layout(); | 227 Layout(); |
228 } | 228 } |
229 | 229 |
230 gfx::Rect SearchBoxView::GetViewBoundsForSearchBoxContentsBounds( | 230 gfx::Rect SearchBoxView::GetViewBoundsForSearchBoxContentsBounds( |
231 const gfx::Rect& rect) const { | 231 const gfx::Rect& rect) const { |
232 gfx::Rect view_bounds = rect; | 232 gfx::Rect view_bounds = rect; |
233 view_bounds.Inset(-GetInsets()); | 233 view_bounds.Inset(-GetInsets()); |
234 return view_bounds; | 234 return view_bounds; |
235 } | 235 } |
236 | 236 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 NotifyQueryChanged(); | 482 NotifyQueryChanged(); |
483 } | 483 } |
484 | 484 |
485 void SearchBoxView::OnSpeechRecognitionStateChanged( | 485 void SearchBoxView::OnSpeechRecognitionStateChanged( |
486 SpeechRecognitionState new_state) { | 486 SpeechRecognitionState new_state) { |
487 SpeechRecognitionButtonPropChanged(); | 487 SpeechRecognitionButtonPropChanged(); |
488 SchedulePaint(); | 488 SchedulePaint(); |
489 } | 489 } |
490 | 490 |
491 } // namespace app_list | 491 } // namespace app_list |
OLD | NEW |