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

Side by Side Diff: ui/app_list/views/search_box_view.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 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
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
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
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/search_result_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698