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

Side by Side Diff: ui/app_list/views/speech_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/speech_view.h" 5 #include "ui/app_list/views/speech_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void OnPaint(gfx::Canvas* canvas) override; 60 void OnPaint(gfx::Canvas* canvas) override;
61 61
62 DISALLOW_COPY_AND_ASSIGN(SoundLevelIndicator); 62 DISALLOW_COPY_AND_ASSIGN(SoundLevelIndicator);
63 }; 63 };
64 64
65 SoundLevelIndicator::SoundLevelIndicator() {} 65 SoundLevelIndicator::SoundLevelIndicator() {}
66 66
67 SoundLevelIndicator::~SoundLevelIndicator() {} 67 SoundLevelIndicator::~SoundLevelIndicator() {}
68 68
69 void SoundLevelIndicator::OnPaint(gfx::Canvas* canvas) { 69 void SoundLevelIndicator::OnPaint(gfx::Canvas* canvas) {
70 SkPaint paint; 70 cc::PaintFlags flags;
71 paint.setStyle(SkPaint::kFill_Style); 71 flags.setStyle(cc::PaintFlags::kFill_Style);
72 paint.setColor(kSoundLevelIndicatorColor); 72 flags.setColor(kSoundLevelIndicatorColor);
73 paint.setAntiAlias(true); 73 flags.setAntiAlias(true);
74 canvas->DrawCircle(bounds().CenterPoint(), width() / 2, paint); 74 canvas->DrawCircle(bounds().CenterPoint(), width() / 2, flags);
75 } 75 }
76 76
77 // MicButton is an image button with a circular hit test mask. 77 // MicButton is an image button with a circular hit test mask.
78 class MicButton : public views::ImageButton, 78 class MicButton : public views::ImageButton,
79 public views::MaskedTargeterDelegate { 79 public views::MaskedTargeterDelegate {
80 public: 80 public:
81 explicit MicButton(views::ButtonListener* listener); 81 explicit MicButton(views::ButtonListener* listener);
82 ~MicButton() override; 82 ~MicButton() override;
83 83
84 private: 84 private:
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); 247 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id));
248 speech_result_->SetEnabledColor(kHintTextColor); 248 speech_result_->SetEnabledColor(kHintTextColor);
249 249
250 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 250 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
251 mic_button_->SetImage(views::Button::STATE_NORMAL, 251 mic_button_->SetImage(views::Button::STATE_NORMAL,
252 bundle.GetImageSkiaNamed(resource_id)); 252 bundle.GetImageSkiaNamed(resource_id));
253 } 253 }
254 254
255 } // namespace app_list 255 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/gfx/BUILD.gn » ('j') | ui/gfx/canvas.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698