OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/aura/client/focus_client.h" | 10 #include "ui/aura/client/focus_client.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 82 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
83 window_->set_owned_by_parent(false); | 83 window_->set_owned_by_parent(false); |
84 } | 84 } |
85 | 85 |
86 virtual ~TestKeyboardControllerProxy() { | 86 virtual ~TestKeyboardControllerProxy() { |
87 // Destroy the window before the delegate. | 87 // Destroy the window before the delegate. |
88 window_.reset(); | 88 window_.reset(); |
89 } | 89 } |
90 | 90 |
91 // Overridden from KeyboardControllerProxy: | 91 // Overridden from KeyboardControllerProxy: |
| 92 virtual bool HasKeyboardWindow() const OVERRIDE { return true; } |
92 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); } | 93 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); } |
93 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; } | 94 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; } |
94 virtual ui::InputMethod* GetInputMethod() OVERRIDE { | 95 virtual ui::InputMethod* GetInputMethod() OVERRIDE { |
95 return input_method_.get(); | 96 return input_method_.get(); |
96 } | 97 } |
97 virtual void RequestAudioInput(content::WebContents* web_contents, | 98 virtual void RequestAudioInput(content::WebContents* web_contents, |
98 const content::MediaStreamRequest& request, | 99 const content::MediaStreamRequest& request, |
99 const content::MediaResponseCallback& callback) OVERRIDE { return; } | 100 const content::MediaResponseCallback& callback) OVERRIDE { return; } |
100 | 101 |
101 private: | 102 private: |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 SetFocus(&input_client); | 611 SetFocus(&input_client); |
611 EXPECT_TRUE(keyboard_container->IsVisible()); | 612 EXPECT_TRUE(keyboard_container->IsVisible()); |
612 | 613 |
613 SetFocus(&no_input_client); | 614 SetFocus(&no_input_client); |
614 // Keyboard should not hide itself after lost focus. | 615 // Keyboard should not hide itself after lost focus. |
615 EXPECT_TRUE(keyboard_container->IsVisible()); | 616 EXPECT_TRUE(keyboard_container->IsVisible()); |
616 EXPECT_FALSE(WillHideKeyboard()); | 617 EXPECT_FALSE(WillHideKeyboard()); |
617 } | 618 } |
618 | 619 |
619 } // namespace keyboard | 620 } // namespace keyboard |
OLD | NEW |