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

Unified Diff: ui/base/ime/input_method_base_unittest.cc

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_base_unittest.cc
diff --git a/ui/base/ime/input_method_base_unittest.cc b/ui/base/ime/input_method_base_unittest.cc
index 797d88edc54c4cbf746088fe3946ee1d137b2d4b..48d0c096138c3aa12addb5b9c3575494e56881da 100644
--- a/ui/base/ime/input_method_base_unittest.cc
+++ b/ui/base/ime/input_method_base_unittest.cc
@@ -147,42 +147,30 @@ class MockInputMethodBase : public InputMethodBase {
// Note: this class does not take the ownership of |verifier|.
MockInputMethodBase(ClientChangeVerifier* verifier) : verifier_(verifier) {
}
- virtual ~MockInputMethodBase() {
- }
+ ~MockInputMethodBase() override {}
private:
// Overriden from InputMethod.
- virtual bool OnUntranslatedIMEMessage(
+ bool OnUntranslatedIMEMessage(
const base::NativeEvent& event,
InputMethod::NativeEventResult* result) override {
return false;
}
- virtual bool DispatchKeyEvent(const ui::KeyEvent&) override {
- return false;
- }
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
- }
- virtual void CancelComposition(const TextInputClient* client) override {
- }
- virtual void OnInputLocaleChanged() override {
- }
- virtual std::string GetInputLocale() override{
- return "";
- }
- virtual bool IsActive() override {
- return false;
- }
- virtual bool IsCandidatePopupOpen() const override {
- return false;
- }
+ bool DispatchKeyEvent(const ui::KeyEvent&) override { return false; }
+ void OnCaretBoundsChanged(const TextInputClient* client) override {}
+ void CancelComposition(const TextInputClient* client) override {}
+ void OnInputLocaleChanged() override {}
+ std::string GetInputLocale() override { return ""; }
+ bool IsActive() override { return false; }
+ bool IsCandidatePopupOpen() const override { return false; }
// Overriden from InputMethodBase.
- virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) override {
+ void OnWillChangeFocusedClient(TextInputClient* focused_before,
+ TextInputClient* focused) override {
verifier_->OnWillChangeFocusedClient(focused_before, focused);
}
- virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) override {
+ void OnDidChangeFocusedClient(TextInputClient* focused_before,
+ TextInputClient* focused) override {
verifier_->OnDidChangeFocusedClient(focused_before, focused);
}
@@ -198,25 +186,18 @@ class MockInputMethodObserver : public InputMethodObserver {
explicit MockInputMethodObserver(ClientChangeVerifier* verifier)
: verifier_(verifier) {
}
- virtual ~MockInputMethodObserver() {
- }
+ ~MockInputMethodObserver() override {}
private:
- virtual void OnTextInputTypeChanged(const TextInputClient* client) override {
- }
- virtual void OnFocus() override {
- }
- virtual void OnBlur() override {
- }
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
- }
- virtual void OnTextInputStateChanged(const TextInputClient* client) override {
+ void OnTextInputTypeChanged(const TextInputClient* client) override {}
+ void OnFocus() override {}
+ void OnBlur() override {}
+ void OnCaretBoundsChanged(const TextInputClient* client) override {}
+ void OnTextInputStateChanged(const TextInputClient* client) override {
verifier_->OnTextInputStateChanged(client);
}
- virtual void OnShowImeIfNeeded() override {
- }
- virtual void OnInputMethodDestroyed(const InputMethod* client) override {
- }
+ void OnShowImeIfNeeded() override {}
+ void OnInputMethodDestroyed(const InputMethod* client) override {}
ClientChangeVerifier* verifier_;
DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver);
@@ -227,18 +208,11 @@ class MockTextInputClient : public DummyTextInputClient {
MockTextInputClient()
: shown_event_count_(0), updated_event_count_(0), hidden_event_count_(0) {
}
- virtual ~MockTextInputClient() {
- }
+ ~MockTextInputClient() override {}
- virtual void OnCandidateWindowShown() override {
- ++shown_event_count_;
- }
- virtual void OnCandidateWindowUpdated() override {
- ++updated_event_count_;
- }
- virtual void OnCandidateWindowHidden() override {
- ++hidden_event_count_;
- }
+ void OnCandidateWindowShown() override { ++shown_event_count_; }
+ void OnCandidateWindowUpdated() override { ++updated_event_count_; }
+ void OnCandidateWindowHidden() override { ++hidden_event_count_; }
int shown_event_count() const { return shown_event_count_; }
int updated_event_count() const { return updated_event_count_; }
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698