Commit 07c6baec authored by James Cook's avatar James Cook Committed by Commit Bot

Rename ImeDriver to ImeDriverMus

It is only used with mus. This also makes the class name match the file
name.

Also fix the build file so it only compiles when mus is enabled.

TBR=msw@chromium.org

Bug: none
Change-Id: I93dbc1a14051208bb0d5964fe68ec4d22201d2ce
Reviewed-on: https://chromium-review.googlesource.com/c/1495812Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Auto-Submit: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636635}
parent 7265935a
...@@ -2946,9 +2946,11 @@ jumbo_split_static_library("ui") { ...@@ -2946,9 +2946,11 @@ jumbo_split_static_library("ui") {
"views/create_application_shortcut_view.h", "views/create_application_shortcut_view.h",
"views/ssl_client_certificate_selector.cc", "views/ssl_client_certificate_selector.cc",
"views/ssl_client_certificate_selector.h", "views/ssl_client_certificate_selector.h",
]
}
# TODO(ellyjones): Mus is not supported on Mac (there is no ui::Window if (enable_mus) {
# apart from aura::Window, which is also not supported). sources += [
"views/ime_driver/ime_driver_mus.cc", "views/ime_driver/ime_driver_mus.cc",
"views/ime_driver/ime_driver_mus.h", "views/ime_driver/ime_driver_mus.h",
"views/ime_driver/remote_text_input_client.cc", "views/ime_driver/remote_text_input_client.cc",
......
...@@ -185,7 +185,7 @@ void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( ...@@ -185,7 +185,7 @@ void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted(
void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
// IME driver must be available at login screen, so initialize before profile. // IME driver must be available at login screen, so initialize before profile.
IMEDriver::Register(); IMEDriverMus::Register();
// NetworkConnect handles the network connection state machine for the UI. // NetworkConnect handles the network connection state machine for the UI.
network_connect_delegate_ = network_connect_delegate_ =
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "services/ws/public/cpp/gpu/gpu.h" // nogncheck #include "services/ws/public/cpp/gpu/gpu.h" // nogncheck
#include "services/ws/public/mojom/constants.mojom.h" #include "services/ws/public/mojom/constants.mojom.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
#include "ui/views/mus/mus_client.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h" #include "ui/views/widget/desktop_aura/desktop_screen.h"
#include "ui/wm/core/wm_state.h" #include "ui/wm/core/wm_state.h"
#endif // defined(USE_AURA) #endif // defined(USE_AURA)
......
...@@ -22,17 +22,17 @@ ...@@ -22,17 +22,17 @@
#include "chrome/browser/ui/views/ime_driver/simple_input_method.h" #include "chrome/browser/ui/views/ime_driver/simple_input_method.h"
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
IMEDriver::IMEDriver() { IMEDriverMus::IMEDriverMus() {
ui::IMEBridge::Initialize(); ui::IMEBridge::Initialize();
} }
IMEDriver::~IMEDriver() {} IMEDriverMus::~IMEDriverMus() {}
// static // static
void IMEDriver::Register() { void IMEDriverMus::Register() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
ws::mojom::IMEDriverPtr ime_driver_ptr; ws::mojom::IMEDriverPtr ime_driver_ptr;
mojo::MakeStrongBinding(std::make_unique<IMEDriver>(), mojo::MakeStrongBinding(std::make_unique<IMEDriverMus>(),
MakeRequest(&ime_driver_ptr)); MakeRequest(&ime_driver_ptr));
ws::mojom::IMERegistrarPtr ime_registrar; ws::mojom::IMERegistrarPtr ime_registrar;
content::ServiceManagerConnection::GetForProcess() content::ServiceManagerConnection::GetForProcess()
...@@ -41,9 +41,10 @@ void IMEDriver::Register() { ...@@ -41,9 +41,10 @@ void IMEDriver::Register() {
ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
} }
void IMEDriver::StartSession(ws::mojom::InputMethodRequest input_method_request, void IMEDriverMus::StartSession(
ws::mojom::TextInputClientPtr client, ws::mojom::InputMethodRequest input_method_request,
ws::mojom::SessionDetailsPtr details) { ws::mojom::TextInputClientPtr client,
ws::mojom::SessionDetailsPtr details) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
std::unique_ptr<RemoteTextInputClient> remote_client = std::unique_ptr<RemoteTextInputClient> remote_client =
std::make_unique<RemoteTextInputClient>(std::move(client), std::make_unique<RemoteTextInputClient>(std::move(client),
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
#include "services/ws/public/mojom/ime/ime.mojom.h" #include "services/ws/public/mojom/ime/ime.mojom.h"
// Creates an InputMethodBridge when an IME session is started via mojo. // Creates an InputMethodBridge when an IME session is started via mojo.
class IMEDriver : public ws::mojom::IMEDriver { class IMEDriverMus : public ws::mojom::IMEDriver {
public: public:
IMEDriver(); IMEDriverMus();
~IMEDriver() override; ~IMEDriverMus() override;
// Instantiate the IME driver and register it to the UI service. // Instantiate the IME driver and register it to the UI service.
static void Register(); static void Register();
...@@ -23,7 +23,7 @@ class IMEDriver : public ws::mojom::IMEDriver { ...@@ -23,7 +23,7 @@ class IMEDriver : public ws::mojom::IMEDriver {
ws::mojom::TextInputClientPtr client, ws::mojom::TextInputClientPtr client,
ws::mojom::SessionDetailsPtr details) override; ws::mojom::SessionDetailsPtr details) override;
DISALLOW_COPY_AND_ASSIGN(IMEDriver); DISALLOW_COPY_AND_ASSIGN(IMEDriverMus);
}; };
#endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment