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

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

Issue 2545543002: Makes InputMethodMus deal with no connection (Closed)
Patch Set: moar Created 4 years 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/window_tree_host_mus.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/aura/mus/input_method_mus.cc b/ui/aura/mus/input_method_mus.cc
index 4904357244760e1ea76b8a646ee6ff19e4c3d039..338e505fcb7e8745a43b0cf979973faa224bb173 100644
--- a/ui/aura/mus/input_method_mus.cc
+++ b/ui/aura/mus/input_method_mus.cc
@@ -33,7 +33,8 @@ InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate,
InputMethodMus::~InputMethodMus() {}
void InputMethodMus::Init(service_manager::Connector* connector) {
- connector->ConnectToInterface(ui::mojom::kServiceName, &ime_server_);
+ if (connector)
+ connector->ConnectToInterface(ui::mojom::kServiceName, &ime_server_);
}
void InputMethodMus::DispatchKeyEvent(
@@ -124,8 +125,10 @@ void InputMethodMus::OnDidChangeFocusedClient(
UpdateTextInputType();
text_input_client_ = base::MakeUnique<TextInputClientImpl>(focused);
- ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(),
- GetProxy(&input_method_));
+ if (ime_server_) {
+ ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(),
+ GetProxy(&input_method_));
+ }
}
void InputMethodMus::UpdateTextInputType() {
« no previous file with comments | « ui/aura/mus/input_method_mus.h ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698