| 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/aura/client/focus_client.h" | 8 #include "ui/aura/client/focus_client.h" |
| 9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/aura/test/aura_test_helper.h" | 10 #include "ui/aura/test/aura_test_helper.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // Destroy the window before the delegate. | 63 // Destroy the window before the delegate. |
| 64 window_.reset(); | 64 window_.reset(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Overridden from KeyboardControllerProxy: | 67 // Overridden from KeyboardControllerProxy: |
| 68 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); } | 68 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); } |
| 69 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; } | 69 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; } |
| 70 virtual ui::InputMethod* GetInputMethod() OVERRIDE { | 70 virtual ui::InputMethod* GetInputMethod() OVERRIDE { |
| 71 return input_method_.get(); | 71 return input_method_.get(); |
| 72 } | 72 } |
| 73 virtual void RequestAudioInput(content::WebContents* web_contents, |
| 74 const content::MediaStreamRequest& request, |
| 75 const content::MediaResponseCallback& callback) OVERRIDE { return; } |
| 73 | 76 |
| 74 private: | 77 private: |
| 75 scoped_ptr<aura::Window> window_; | 78 scoped_ptr<aura::Window> window_; |
| 76 aura::test::TestWindowDelegate delegate_; | 79 aura::test::TestWindowDelegate delegate_; |
| 77 scoped_ptr<ui::InputMethod> input_method_; | 80 scoped_ptr<ui::InputMethod> input_method_; |
| 78 | 81 |
| 79 DISALLOW_COPY_AND_ASSIGN(TestKeyboardControllerProxy); | 82 DISALLOW_COPY_AND_ASSIGN(TestKeyboardControllerProxy); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 // Keeps a count of all the events a window receives. | 85 // Keeps a count of all the events a window receives. |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 EXPECT_TRUE(keyboard_container->IsVisible()); | 276 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 274 | 277 |
| 275 input_method->SetFocusedTextInputClient(&no_input_client); | 278 input_method->SetFocusedTextInputClient(&no_input_client); |
| 276 EXPECT_FALSE(keyboard_container->IsVisible()); | 279 EXPECT_FALSE(keyboard_container->IsVisible()); |
| 277 | 280 |
| 278 input_method->SetFocusedTextInputClient(&input_client); | 281 input_method->SetFocusedTextInputClient(&input_client); |
| 279 EXPECT_TRUE(keyboard_container->IsVisible()); | 282 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 280 } | 283 } |
| 281 | 284 |
| 282 } // namespace keyboard | 285 } // namespace keyboard |
| OLD | NEW |