OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |