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

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

Issue 2716213002: ui: Fix cc/paint skia type mismatches (Closed)
Patch Set: Created 3 years, 9 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class SearchBoxBackground : public views::Background { 51 class SearchBoxBackground : public views::Background {
52 public: 52 public:
53 SearchBoxBackground() {} 53 SearchBoxBackground() {}
54 ~SearchBoxBackground() override {} 54 ~SearchBoxBackground() override {}
55 55
56 private: 56 private:
57 // views::Background overrides: 57 // views::Background overrides:
58 void Paint(gfx::Canvas* canvas, views::View* view) const override { 58 void Paint(gfx::Canvas* canvas, views::View* view) const override {
59 gfx::Rect bounds = view->GetContentsBounds(); 59 gfx::Rect bounds = view->GetContentsBounds();
60 60
61 SkPaint paint; 61 cc::PaintFlags flags;
62 paint.setFlags(SkPaint::kAntiAlias_Flag); 62 flags.setAntiAlias(true);
63 paint.setColor(kSearchBoxBackground); 63 flags.setColor(kSearchBoxBackground);
64 canvas->DrawRoundRect(bounds, kBackgroundBorderCornerRadius, paint); 64 canvas->DrawRoundRect(bounds, kBackgroundBorderCornerRadius, flags);
65 } 65 }
66 66
67 DISALLOW_COPY_AND_ASSIGN(SearchBoxBackground); 67 DISALLOW_COPY_AND_ASSIGN(SearchBoxBackground);
68 }; 68 };
69 69
70 } // namespace 70 } // namespace
71 71
72 // To paint grey background on mic and back buttons 72 // To paint grey background on mic and back buttons
73 class SearchBoxImageButton : public views::ImageButton { 73 class SearchBoxImageButton : public views::ImageButton {
74 public: 74 public:
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 NotifyQueryChanged(); 427 NotifyQueryChanged();
428 } 428 }
429 429
430 void SearchBoxView::OnSpeechRecognitionStateChanged( 430 void SearchBoxView::OnSpeechRecognitionStateChanged(
431 SpeechRecognitionState new_state) { 431 SpeechRecognitionState new_state) {
432 SpeechRecognitionButtonPropChanged(); 432 SpeechRecognitionButtonPropChanged();
433 SchedulePaint(); 433 SchedulePaint();
434 } 434 }
435 435
436 } // namespace app_list 436 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698