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

Unified Diff: blimp/client/app/linux/blimp_client_session_linux.cc

Issue 2023613002: Add a FakeImeFeatureDelegate to the Linux client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments & fix private: placement Created 4 years, 7 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 | « blimp/client/app/linux/blimp_client_session_linux.h ('k') | blimp/client/feature/ime_feature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/linux/blimp_client_session_linux.cc
diff --git a/blimp/client/app/linux/blimp_client_session_linux.cc b/blimp/client/app/linux/blimp_client_session_linux.cc
index 66ab8ed9504c0779da06ee05ea64b4f85e2094f0..42952e260aac705218f0b985bfbf5c7b314aeed8 100644
--- a/blimp/client/app/linux/blimp_client_session_linux.cc
+++ b/blimp/client/app/linux/blimp_client_session_linux.cc
@@ -18,7 +18,7 @@ namespace client {
namespace {
const int kDummyTabId = 0;
-const std::string kDefaultAssignerUrl =
+const char kDefaultAssignerUrl[] =
"https://blimp-pa.googleapis.com/v1/assignment";
class FakeNavigationFeatureDelegate
@@ -66,18 +66,47 @@ void FakeNavigationFeatureDelegate::OnPageLoadStatusUpdate(int tab_id,
" in tab " << tab_id;
}
+class FakeImeFeatureDelegate : public ImeFeature::Delegate {
+ public:
+ FakeImeFeatureDelegate();
+ ~FakeImeFeatureDelegate() override;
+
+ // ImeFeature::Delegate implementation.
+ void OnShowImeRequested(ui::TextInputType input_type,
+ const std::string& text) override;
+ void OnHideImeRequested() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FakeImeFeatureDelegate);
+};
+
+FakeImeFeatureDelegate::FakeImeFeatureDelegate() {}
+
+FakeImeFeatureDelegate::~FakeImeFeatureDelegate() {}
+
+void FakeImeFeatureDelegate::OnShowImeRequested(ui::TextInputType input_type,
+ const std::string& text) {
+ DVLOG(1) << "Show IME requested (input_type=" << input_type << ")";
+}
+
+void FakeImeFeatureDelegate::OnHideImeRequested() {
+ DVLOG(1) << "Hide IME requested";
+}
+
} // namespace
BlimpClientSessionLinux::BlimpClientSessionLinux()
: BlimpClientSession(GURL(kDefaultAssignerUrl)),
event_source_(ui::PlatformEventSource::CreateDefault()),
- navigation_feature_delegate_(new FakeNavigationFeatureDelegate) {
+ navigation_feature_delegate_(new FakeNavigationFeatureDelegate),
+ ime_feature_delegate_(new FakeImeFeatureDelegate) {
blimp_display_manager_.reset(new BlimpDisplayManager(gfx::Size(800, 600),
this,
GetRenderWidgetFeature(),
GetTabControlFeature()));
GetNavigationFeature()->SetDelegate(kDummyTabId,
navigation_feature_delegate_.get());
+ GetImeFeature()->set_delegate(ime_feature_delegate_.get());
}
BlimpClientSessionLinux::~BlimpClientSessionLinux() {}
« no previous file with comments | « blimp/client/app/linux/blimp_client_session_linux.h ('k') | blimp/client/feature/ime_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698