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

Side by Side Diff: views/widget/widget.cc

Issue 7746005: Focus fix. InputMethod needs to be initialized before calling OnFocus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/widget.h" 5 #include "views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/l10n/l10n_font_util.h" 10 #include "ui/base/l10n/l10n_font_util.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 591 }
592 592
593 FocusManager* Widget::GetFocusManager() { 593 FocusManager* Widget::GetFocusManager() {
594 Widget* toplevel_widget = GetTopLevelWidget(); 594 Widget* toplevel_widget = GetTopLevelWidget();
595 return toplevel_widget ? toplevel_widget->focus_manager_.get() : NULL; 595 return toplevel_widget ? toplevel_widget->focus_manager_.get() : NULL;
596 } 596 }
597 597
598 InputMethod* Widget::GetInputMethod() { 598 InputMethod* Widget::GetInputMethod() {
599 if (is_top_level()) { 599 if (is_top_level()) {
600 if (!input_method_.get()) 600 if (!input_method_.get())
601 ReplaceInputMethod(native_widget_->CreateInputMethod()); 601 input_method_.reset(native_widget_->CreateInputMethod());
602 return input_method_.get(); 602 return input_method_.get();
603 } else { 603 } else {
604 Widget* toplevel = GetTopLevelWidget(); 604 Widget* toplevel = GetTopLevelWidget();
605 return toplevel ? toplevel->GetInputMethod() : NULL; 605 return toplevel ? toplevel->GetInputMethod() : NULL;
606 } 606 }
607 } 607 }
608 608
609 void Widget::RunShellDrag(View* view, const ui::OSExchangeData& data, 609 void Widget::RunShellDrag(View* view, const ui::OSExchangeData& data,
610 int operation) { 610 int operation) {
611 dragged_view_ = view; 611 dragged_view_ = view;
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 1126
1127 //////////////////////////////////////////////////////////////////////////////// 1127 ////////////////////////////////////////////////////////////////////////////////
1128 // internal::NativeWidgetPrivate, NativeWidget implementation: 1128 // internal::NativeWidgetPrivate, NativeWidget implementation:
1129 1129
1130 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1130 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1131 return this; 1131 return this;
1132 } 1132 }
1133 1133
1134 } // namespace internal 1134 } // namespace internal
1135 } // namespace views 1135 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698