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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased & removed views::View::GetTextInputClient & removed GetFocusedTextInputClient. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/cocoa/bridged_native_widget.mm
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index c5fa0a2c5ca7cb9376e0e21eead05b14dd0d8cd8..530603972c08927ca835caef0d7663d3d7657e59 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -25,8 +25,6 @@
#include "ui/views/cocoa/tooltip_manager_mac.h"
#import "ui/views/cocoa/views_nswindow_delegate.h"
#import "ui/views/cocoa/widget_owner_nswindow_adapter.h"
-#include "ui/views/ime/input_method_bridge.h"
-#include "ui/views/ime/null_input_method.h"
#include "ui/views/view.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/native_widget_mac.h"
@@ -707,15 +705,12 @@ void BridgedNativeWidget::OnSizeConstraintsChanged() {
shows_fullscreen_controls);
}
-InputMethod* BridgedNativeWidget::CreateInputMethod() {
- return new InputMethodBridge(this, GetHostInputMethod(), true);
-}
-
-ui::InputMethod* BridgedNativeWidget::GetHostInputMethod() {
+ui::InputMethod* BridgedNativeWidget::GetInputMethod() {
if (!input_method_) {
// Delegate is NULL because Mac IME does not need DispatchKeyEventPostIME
// callbacks.
input_method_ = ui::CreateInputMethod(NULL, nil);
+ input_method_->OnFocus();
}
return input_method_.get();
}
@@ -755,16 +750,6 @@ void BridgedNativeWidget::CreateLayer(ui::LayerType layer_type,
}
////////////////////////////////////////////////////////////////////////////////
-// BridgedNativeWidget, internal::InputMethodDelegate:
-
-void BridgedNativeWidget::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
- DCHECK(focus_manager_);
- native_widget_mac_->GetWidget()->OnKeyEvent(const_cast<ui::KeyEvent*>(&key));
- if (!key.handled())
- focus_manager_->OnKeyEvent(key);
-}
-
-////////////////////////////////////////////////////////////////////////////////
// BridgedNativeWidget, CocoaMouseCaptureDelegate:
void BridgedNativeWidget::PostCapturedEvent(NSEvent* event) {

Powered by Google App Engine
This is Rietveld 408576698