OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/aura/client/aura_constants.h" | 5 #include "ui/aura/client/aura_constants.h" |
6 #include "ui/aura/window.h" | 6 #include "ui/aura/window.h" |
7 #include "ui/base/ime/dummy_input_method.h" | 7 #include "ui/base/ime/dummy_input_method.h" |
8 #include "ui/base/ime/text_input_client.h" | 8 #include "ui/base/ime/text_input_client.h" |
9 #include "ui/views/ime/input_method.h" | 9 #include "ui/views/ime/input_method.h" |
10 #include "ui/views/test/views_test_base.h" | 10 #include "ui/views/test/views_test_base.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 toplevel->Init(toplevel_params); | 62 toplevel->Init(toplevel_params); |
63 | 63 |
64 Widget* child = new Widget; | 64 Widget* child = new Widget; |
65 Widget::InitParams child_params = | 65 Widget::InitParams child_params = |
66 CreateParams(Widget::InitParams::TYPE_POPUP); | 66 CreateParams(Widget::InitParams::TYPE_POPUP); |
67 child_params.parent = toplevel->GetNativeView(); | 67 child_params.parent = toplevel->GetNativeView(); |
68 // |child| owns |native_widget|. | 68 // |child| owns |native_widget|. |
69 child_params.native_widget = new NativeWidgetAura(child); | 69 child_params.native_widget = new NativeWidgetAura(child); |
70 child->Init(child_params); | 70 child->Init(child_params); |
71 | 71 |
72 child->GetInputMethod()->OnFocus(); | |
73 | |
74 toplevel->CloseNow(); | 72 toplevel->CloseNow(); |
75 | 73 |
76 GetContext()->SetProperty(aura::client::kRootWindowInputMethodKey, | 74 GetContext()->SetProperty(aura::client::kRootWindowInputMethodKey, |
77 static_cast<ui::InputMethod*>(NULL)); | 75 static_cast<ui::InputMethod*>(NULL)); |
78 } | 76 } |
79 | 77 |
80 } // namespace views | 78 } // namespace views |
OLD | NEW |