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

Side by Side Diff: blimp/engine/feature/engine_render_widget_feature_unittest.cc

Issue 2024033006: Make ui::TextInputClient::IsEditCommandEnabled const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/feature/engine_render_widget_feature.h" 5 #include "blimp/engine/feature/engine_render_widget_feature.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void AddMouseEventCallback(const MouseEventCallback& callback) override {} 97 void AddMouseEventCallback(const MouseEventCallback& callback) override {}
98 void RemoveMouseEventCallback(const MouseEventCallback& callback) override {} 98 void RemoveMouseEventCallback(const MouseEventCallback& callback) override {}
99 void GetWebScreenInfo(blink::WebScreenInfo* result) override {} 99 void GetWebScreenInfo(blink::WebScreenInfo* result) override {}
100 bool GetScreenColorProfile(std::vector<char>* color_profile) override { 100 bool GetScreenColorProfile(std::vector<char>* color_profile) override {
101 return false; } 101 return false; }
102 void HandleCompositorProto(const std::vector<uint8_t>& proto) override {} 102 void HandleCompositorProto(const std::vector<uint8_t>& proto) override {}
103 103
104 bool Send(IPC::Message* msg) override { return false; } 104 bool Send(IPC::Message* msg) override { return false; }
105 }; 105 };
106 106
107 class MockTextInputClient : public ui::TextInputClient { 107 class MockTextInputClient : public ui::TextInputClient {
tapted 2016/06/06 07:17:21 Can this inherit from DummyTextInputClient instead
karandeepb 2016/06/08 03:01:55 Will do this in a separate CL - https://codereview
108 ui::TextInputType text_input_type_; 108 ui::TextInputType text_input_type_;
109 109
110 public: 110 public:
111 MockTextInputClient() : text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {} 111 MockTextInputClient() : text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {}
112 ~MockTextInputClient() override {} 112 ~MockTextInputClient() override {}
113 113
114 void SetCompositionText(const ui::CompositionText& composition) override {} 114 void SetCompositionText(const ui::CompositionText& composition) override {}
115 void ConfirmCompositionText() override {} 115 void ConfirmCompositionText() override {}
116 void ClearCompositionText() override {} 116 void ClearCompositionText() override {}
117 void InsertText(const base::string16& text) override {} 117 void InsertText(const base::string16& text) override {}
(...skipping 19 matching lines...) Expand all
137 bool GetSelectionRange(gfx::Range* range) const override { return false; } 137 bool GetSelectionRange(gfx::Range* range) const override { return false; }
138 bool SetSelectionRange(const gfx::Range& range) override { return false; } 138 bool SetSelectionRange(const gfx::Range& range) override { return false; }
139 bool DeleteRange(const gfx::Range& range) override { return false; } 139 bool DeleteRange(const gfx::Range& range) override { return false; }
140 void OnInputMethodChanged() override {} 140 void OnInputMethodChanged() override {}
141 bool ChangeTextDirectionAndLayoutAlignment( 141 bool ChangeTextDirectionAndLayoutAlignment(
142 base::i18n::TextDirection direction) override { 142 base::i18n::TextDirection direction) override {
143 return false; 143 return false;
144 } 144 }
145 void ExtendSelectionAndDelete(size_t before, size_t after) override {} 145 void ExtendSelectionAndDelete(size_t before, size_t after) override {}
146 void EnsureCaretInRect(const gfx::Rect& rect) override {} 146 void EnsureCaretInRect(const gfx::Rect& rect) override {}
147 bool IsEditCommandEnabled(int command_id) override { return false; } 147 bool IsEditCommandEnabled(int command_id) const override { return false; }
148 void SetEditCommandForNextKeyEvent(int command_id) override {} 148 void SetEditCommandForNextKeyEvent(int command_id) override {}
149 bool GetTextFromRange(const gfx::Range& range, 149 bool GetTextFromRange(const gfx::Range& range,
150 base::string16* text) const override { 150 base::string16* text) const override {
151 *text = base::string16(base::ASCIIToUTF16("green apple")); 151 *text = base::string16(base::ASCIIToUTF16("green apple"));
152 return false; 152 return false;
153 } 153 }
154 }; 154 };
155 155
156 MATCHER_P(CompMsgEquals, contents, "") { 156 MATCHER_P(CompMsgEquals, contents, "") {
157 if (contents.size() != arg.size()) 157 if (contents.size() != arg.size())
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 feature_.OnRenderWidgetCreated(1, &render_widget_host1_); 374 feature_.OnRenderWidgetCreated(1, &render_widget_host1_);
375 feature_.OnRenderWidgetCreated(2, &render_widget_host2_); 375 feature_.OnRenderWidgetCreated(2, &render_widget_host2_);
376 feature_.OnRenderWidgetInitialized(1, &render_widget_host1_); 376 feature_.OnRenderWidgetInitialized(1, &render_widget_host1_);
377 feature_.OnRenderWidgetDeleted(2, &render_widget_host2_); 377 feature_.OnRenderWidgetDeleted(2, &render_widget_host2_);
378 feature_.SendCompositorMessage(1, &render_widget_host1_, payload); 378 feature_.SendCompositorMessage(1, &render_widget_host1_, payload);
379 } 379 }
380 380
381 } // namespace engine 381 } // namespace engine
382 } // namespace blimp 382 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698