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

Unified Diff: ui/views/widget/widget.cc

Issue 860983004: text input focus: Supports Window::GetFocusedTextInputClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/views/widget/widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 15f7f1352c258c37391faa7df1fc3a7d163130c7..241a327554cff9f5b73966d09527fdac0a16f032 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -439,9 +439,9 @@ void Widget::NotifyNativeViewHierarchyChanged() {
}
void Widget::NotifyWillRemoveView(View* view) {
- FOR_EACH_OBSERVER(WidgetRemovalsObserver,
- removals_observers_,
- OnWillRemoveView(this, view));
+ FOR_EACH_OBSERVER(WidgetRemovalsObserver,
+ removals_observers_,
+ OnWillRemoveView(this, view));
}
// Converted methods (see header) ----------------------------------------------
@@ -756,6 +756,12 @@ const FocusManager* Widget::GetFocusManager() const {
return toplevel_widget ? toplevel_widget->focus_manager_.get() : NULL;
}
+ui::TextInputClient* Widget::GetFocusedTextInputClient() {
+ FocusManager* focus_manager = GetFocusManager();
+ View* view = focus_manager ? focus_manager->GetFocusedView() : nullptr;
+ return view ? view->GetTextInputClient() : nullptr;
+}
+
InputMethod* Widget::GetInputMethod() {
return const_cast<InputMethod*>(
const_cast<const Widget*>(this)->GetInputMethod());
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698