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

Unified Diff: ui/app_list/views/speech_view.cc

Issue 1477433005: Remove kuint8max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint4
Patch Set: rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/public/base/unique_position.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/speech_view.cc
diff --git a/ui/app_list/views/speech_view.cc b/ui/app_list/views/speech_view.cc
index b721b3f612bf56b31ffcc32d52e75f92349ebf13..49a8c7f416301800ca8729d63396b017fbb105d3 100644
--- a/ui/app_list/views/speech_view.cc
+++ b/ui/app_list/views/speech_view.cc
@@ -4,6 +4,10 @@
#include "ui/app_list/views/speech_view.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/app_list/app_list_constants.h"
@@ -163,10 +167,10 @@ void SpeechView::Reset() {
OnSpeechRecognitionStateChanged(delegate_->GetSpeechUI()->state());
}
-int SpeechView::GetIndicatorRadius(uint8 level) {
+int SpeechView::GetIndicatorRadius(uint8_t level) {
int radius_min = mic_button_->width() / 2 + kIndicatorRadiusMinOffset;
int range = kIndicatorRadiusMax - radius_min;
- return level * range / kuint8max + radius_min;
+ return level * range / std::numeric_limits<uint8_t>::max() + radius_min;
}
void SpeechView::Layout() {
@@ -200,7 +204,7 @@ void SpeechView::ButtonPressed(views::Button* sender, const ui::Event& event) {
delegate_->StopSpeechRecognition();
}
-void SpeechView::OnSpeechSoundLevelChanged(uint8 level) {
+void SpeechView::OnSpeechSoundLevelChanged(uint8_t level) {
if (!visible() ||
delegate_->GetSpeechUI()->state() == SPEECH_RECOGNITION_NETWORK_ERROR)
return;
« no previous file with comments | « sync/internal_api/public/base/unique_position.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698