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

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

Issue 853073002: Update {virtual,override,final} to follow C++11 style in ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_chromeos.h ('k') | ui/chromeos/network/network_icon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_chromeos_unittest.cc
diff --git a/ui/base/ime/input_method_chromeos_unittest.cc b/ui/base/ime/input_method_chromeos_unittest.cc
index bb5efdc19122f096c848c462fc329560f03a1c85..0f5ce75686cdb8dfdc8aea00ce6c59bd0e04f0a4 100644
--- a/ui/base/ime/input_method_chromeos_unittest.cc
+++ b/ui/base/ime/input_method_chromeos_unittest.cc
@@ -80,8 +80,8 @@ class TestableInputMethodChromeOS : public InputMethodChromeOS {
};
// Overridden from InputMethodChromeOS:
- virtual void ProcessKeyEventPostIME(const ui::KeyEvent& key_event,
- bool handled) override {
+ void ProcessKeyEventPostIME(const ui::KeyEvent& key_event,
+ bool handled) override {
process_key_event_post_ime_args_.event = &key_event;
process_key_event_post_ime_args_.handled = handled;
++process_key_event_post_ime_call_count_;
@@ -208,10 +208,9 @@ class InputMethodChromeOSTest : public internal::InputMethodDelegate,
ResetFlags();
}
- virtual ~InputMethodChromeOSTest() {
- }
+ ~InputMethodChromeOSTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
chromeos::IMEBridge::Initialize();
mock_ime_engine_handler_.reset(
@@ -231,7 +230,7 @@ class InputMethodChromeOSTest : public internal::InputMethodDelegate,
ime_->SetFocusedTextInputClient(this);
}
- virtual void TearDown() override {
+ void TearDown() override {
if (ime_.get()) {
if (switches::IsTextInputFocusManagerEnabled())
TextInputFocusManager::GetInstance()->BlurTextInputClient(this);
@@ -247,92 +246,76 @@ class InputMethodChromeOSTest : public internal::InputMethodDelegate,
}
// Overridden from ui::internal::InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
dispatched_key_event_ = event;
return false;
}
// Overridden from ui::TextInputClient:
- virtual void SetCompositionText(
- const CompositionText& composition) override {
+ void SetCompositionText(const CompositionText& composition) override {
composition_text_ = composition;
}
- virtual void ConfirmCompositionText() override {
+ void ConfirmCompositionText() override {
confirmed_text_ = composition_text_;
composition_text_.Clear();
}
- virtual void ClearCompositionText() override {
- composition_text_.Clear();
- }
- virtual void InsertText(const base::string16& text) override {
+ void ClearCompositionText() override { composition_text_.Clear(); }
+ void InsertText(const base::string16& text) override {
inserted_text_ = text;
}
- virtual void InsertChar(base::char16 ch, int flags) override {
+ void InsertChar(base::char16 ch, int flags) override {
inserted_char_ = ch;
inserted_char_flags_ = flags;
}
- virtual gfx::NativeWindow GetAttachedWindow() const override {
+ gfx::NativeWindow GetAttachedWindow() const override {
return static_cast<gfx::NativeWindow>(NULL);
}
- virtual TextInputType GetTextInputType() const override {
- return input_type_;
- }
- virtual TextInputMode GetTextInputMode() const override {
- return input_mode_;
- }
- virtual int GetTextInputFlags() const override {
- return 0;
- }
- virtual bool CanComposeInline() const override {
- return can_compose_inline_;
- }
- virtual gfx::Rect GetCaretBounds() const override {
- return caret_bounds_;
- }
- virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const override {
+ TextInputType GetTextInputType() const override { return input_type_; }
+ TextInputMode GetTextInputMode() const override { return input_mode_; }
+ int GetTextInputFlags() const override { return 0; }
+ bool CanComposeInline() const override { return can_compose_inline_; }
+ gfx::Rect GetCaretBounds() const override { return caret_bounds_; }
+ bool GetCompositionCharacterBounds(uint32 index,
+ gfx::Rect* rect) const override {
return false;
}
- virtual bool HasCompositionText() const override {
+ bool HasCompositionText() const override {
CompositionText empty;
return composition_text_ != empty;
}
- virtual bool GetTextRange(gfx::Range* range) const override {
+ bool GetTextRange(gfx::Range* range) const override {
*range = text_range_;
return true;
}
- virtual bool GetCompositionTextRange(gfx::Range* range) const override {
+ bool GetCompositionTextRange(gfx::Range* range) const override {
return false;
}
- virtual bool GetSelectionRange(gfx::Range* range) const override {
+ bool GetSelectionRange(gfx::Range* range) const override {
*range = selection_range_;
return true;
}
- virtual bool SetSelectionRange(const gfx::Range& range) override {
- return false;
- }
- virtual bool DeleteRange(const gfx::Range& range) override { return false; }
- virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const override {
+ bool SetSelectionRange(const gfx::Range& range) override { return false; }
+ bool DeleteRange(const gfx::Range& range) override { return false; }
+ bool GetTextFromRange(const gfx::Range& range,
+ base::string16* text) const override {
*text = surrounding_text_.substr(range.GetMin(), range.length());
return true;
}
- virtual void OnInputMethodChanged() override {
+ void OnInputMethodChanged() override {
++on_input_method_changed_call_count_;
}
- virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) override { return false; }
- virtual void ExtendSelectionAndDelete(size_t before,
- size_t after) override {}
- virtual void EnsureCaretInRect(const gfx::Rect& rect) override {}
- virtual void OnCandidateWindowShown() override {}
- virtual void OnCandidateWindowUpdated() override {}
- virtual void OnCandidateWindowHidden() override {}
- virtual bool IsEditingCommandEnabled(int command_id) override {
+ bool ChangeTextDirectionAndLayoutAlignment(
+ base::i18n::TextDirection direction) override {
return false;
}
- virtual void ExecuteEditingCommand(int command_id) override {}
+ void ExtendSelectionAndDelete(size_t before, size_t after) override {}
+ void EnsureCaretInRect(const gfx::Rect& rect) override {}
+ void OnCandidateWindowShown() override {}
+ void OnCandidateWindowUpdated() override {}
+ void OnCandidateWindowHidden() override {}
+ bool IsEditingCommandEnabled(int command_id) override { return false; }
+ void ExecuteEditingCommand(int command_id) override {}
bool HasNativeEvent() const {
return dispatched_key_event_.HasNativeEvent();
@@ -947,9 +930,9 @@ TEST_F(InputMethodChromeOSTest, SurroundingText_BecomeEmptyText) {
class InputMethodChromeOSKeyEventTest : public InputMethodChromeOSTest {
public:
InputMethodChromeOSKeyEventTest() {}
- virtual ~InputMethodChromeOSKeyEventTest() {}
+ ~InputMethodChromeOSKeyEventTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
InputMethodChromeOSTest::SetUp();
ime_->Init(true);
}
« no previous file with comments | « ui/base/ime/input_method_chromeos.h ('k') | ui/chromeos/network/network_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698