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

Unified Diff: ui/aura/mus/input_method_mus.cc

Issue 2445163002: Make aura work with mus (Closed)
Patch Set: NON_EXPORTED_BASE_CLASS Created 4 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/aura/mus/input_method_mus.h ('k') | ui/aura/mus/mus_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/input_method_mus.cc
diff --git a/ui/views/mus/input_method_mus.cc b/ui/aura/mus/input_method_mus.cc
similarity index 91%
copy from ui/views/mus/input_method_mus.cc
copy to ui/aura/mus/input_method_mus.cc
index 9166d5d6836ad826691abc0dda4ccc3c6ce4515e..9e3ed158fb9d6d8415d6249dee82bfb8a2a541d1 100644
--- a/ui/views/mus/input_method_mus.cc
+++ b/ui/aura/mus/input_method_mus.cc
@@ -2,27 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/views/mus/input_method_mus.h"
+#include "ui/aura/mus/input_method_mus.h"
#include <utility>
-#include "services/ui/public/cpp/window.h"
#include "services/ui/public/interfaces/ime.mojom.h"
+#include "services/ui/public/interfaces/window_tree_constants.mojom.h"
+#include "ui/aura/mus/text_input_client_impl.h"
+#include "ui/aura/mus/window_port_mus.h"
+#include "ui/aura/window.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/events/event.h"
#include "ui/platform_window/mojo/ime_type_converters.h"
#include "ui/platform_window/mojo/text_input_state.mojom.h"
-#include "ui/views/mus/text_input_client_impl.h"
using ui::mojom::EventResult;
-namespace views {
+namespace aura {
////////////////////////////////////////////////////////////////////////////////
// InputMethodMus, public:
InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate,
- ui::Window* window)
+ Window* window)
: window_(window) {
SetDelegate(delegate);
}
@@ -130,10 +132,11 @@ void InputMethodMus::UpdateTextInputType() {
mojo::TextInputStatePtr state = mojo::TextInputState::New();
state->type = mojo::ConvertTo<mojo::TextInputType>(type);
if (window_) {
+ WindowPortMus* window_impl_mus = WindowPortMus::Get(window_);
if (type != ui::TEXT_INPUT_TYPE_NONE)
- window_->SetImeVisibility(true, std::move(state));
+ window_impl_mus->SetImeVisibility(true, std::move(state));
else
- window_->SetTextInputState(std::move(state));
+ window_impl_mus->SetTextInputState(std::move(state));
}
}
@@ -160,4 +163,4 @@ void InputMethodMus::ProcessKeyEventCallback(
ack_callback->Run(event_result);
}
-} // namespace views
+} // namespace aura
« no previous file with comments | « ui/aura/mus/input_method_mus.h ('k') | ui/aura/mus/mus_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698